It acts as a facade on top of the DCSubjectImpl elements of the underlying list and remains in synch with it. It is possible to work on either list, the categories one or the subjects one and they remain in synch.
This is necessary because the SyndFeedImpl categories are just a convenience to access the DublinCore subjects.
All this mess to avoid making DCSubjectImpl implement SyndCategory (which it would be odd).
| Modifier and Type | Field and Description |
|---|---|
| private final List |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SyndCategoryListFacade(final List<DCSubject>
the list of subjects to create the facade. subjects)Creates a facade list of categories on top the given subject list. |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(final int
position to add the category. index, final SyndCategory the SyndCategoryImpl object to add. obj)Overrides java. Implements java. |
| public static List | Returns: a list with DCSubject elements corresponding to the categories in the given list.the list with SyndCategoryImpl elements to convert to subject list. cList)Returns a list with the DCSubject elements of the SyndCategoryImpl list facade. |
| public SyndCategory | Returns: the SyndCategoryImpl in position index, null if none.the index position to retrieve the category. index)Implements abstract java. Implements java. |
| public SyndCategory | Returns: the SyndCategoryImpl being removed from position index, null if none.position to remove the category from. index)Overrides java. Implements java. |
| public SyndCategory | Returns: the SyndCategoryImpl object that is being replaced, null if none.position to set the category. index, final SyndCategory the SyndCategoryImpl object to set. obj)Overrides java. Implements java. |
| public int | Returns: the size of the list.Implements abstract java. Implements java. |
| subjects | back to summary |
|---|---|
| private final List<DCSubject> subjects | |
| SyndCategoryListFacade | back to summary |
|---|---|
| public SyndCategoryListFacade() Default constructor. Creates and empty list. | |
| SyndCategoryListFacade | back to summary |
|---|---|
| public SyndCategoryListFacade(final List<DCSubject> subjects) Creates a facade list of categories on top the given subject list.
| |
| add | back to summary |
|---|---|
| public void add(final int index, final SyndCategory obj) Overrides java. Implements java. Adds a category to the list.
| |
| convertElementsSyndCategoryToSubject | back to summary |
|---|---|
| public static List Returns a list with the DCSubject elements of the SyndCategoryImpl list facade. To be used by the SyndFeedImpl class only.
| |
| get | back to summary |
|---|---|
| public SyndCategory get(final int index) Implements abstract java. Implements java. Gets the category by index.
| |
| remove | back to summary |
|---|---|
| public SyndCategory remove(final int index) Overrides java. Implements java. Removes a category element from a specific position.
| |
| set | back to summary |
|---|---|
| public SyndCategory set(final int index, final SyndCategory obj) Overrides java. Implements java. Sets a category in an existing position in the list.
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Returns the size of the list.
| |