com.sun.syndication.feed.synd
class SyndCategoryListFacade extends AbstractList
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).
Field Summary | |
---|---|
List | _subjects |
Constructor Summary | |
---|---|
SyndCategoryListFacade()
Default constructor. | |
SyndCategoryListFacade(List subjects)
Creates a facade list of categories on top the given subject list.
|
Method Summary | |
---|---|
void | add(int index, Object obj)
Adds a category to the list.
|
static List | convertElementsSyndCategoryToSubject(List cList)
Returns a list with the DCSubject elements of the SyndCategoryImpl list facade.
|
Object | get(int index)
Gets the category by index.
|
Object | remove(int index)
Removes a category element from a specific position.
|
Object | set(int index, Object obj)
Sets a category in an existing position in the list.
|
int | size()
Returns the size of the list.
|
Parameters: subjects the list of subjects to create the facade.
Parameters: index position to add the category. obj the SyndCategoryImpl object to add.
Parameters: cList the list with SyndCategoryImpl elements to convert to subject list.
Returns: a list with DCSubject elements corresponding to the categories in the given list.
Parameters: index the index position to retrieve the category.
Returns: the SyndCategoryImpl in position index, null if none.
Parameters: index position to remove the category from.
Returns: the SyndCategoryImpl being removed from position index, null if none.
Parameters: index position to set the category. obj the SyndCategoryImpl object to set.
Returns: the SyndCategoryImpl object that is being replaced, null if none.
Returns: the size of the list.