|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
com.sun.syndication.feed.synd.SyndCategoryListFacade
List implementation for SyndCategory elements. To be directly used by the SyndFeed and SyndEntry classes only.
It acts as a facade on top of the DCSubject 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 SyndFeed categories are just a convenience to access the DublinCore subjects.
All this mess to avoid making DCSubject implement SyndCategoryI (which it would be odd).
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
SyndCategoryListFacade()
Default constructor. |
|
SyndCategoryListFacade(java.util.List subjects)
Creates a facade list of categories on top the given subject list. |
Method Summary | |
void |
add(int index,
java.lang.Object obj)
Adds a category to the list. |
static java.util.List |
convertElementsSyndCategoryToSubject(java.util.List cList)
Returns a list with the DCSubjectI elements of the SyndCategory list facade. |
java.lang.Object |
get(int index)
Gets the category by index. |
java.lang.Object |
remove(int index)
Removes a category element from a specific position. |
java.lang.Object |
set(int index,
java.lang.Object obj)
Sets a category in an existing position in the list. |
int |
size()
Returns the size of the list. |
Methods inherited from class java.util.AbstractList |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public SyndCategoryListFacade()
public SyndCategoryListFacade(java.util.List subjects)
subjects
- the list of subjects to create the facade.Method Detail |
public java.lang.Object get(int index)
index
- the index position to retrieve the category.
public int size()
public java.lang.Object set(int index, java.lang.Object obj)
index
- position to set the category.obj
- the SyndCategory object to set.
public void add(int index, java.lang.Object obj)
index
- position to add the category.obj
- the SyndCategory object to add.public java.lang.Object remove(int index)
index
- position to remove the category from.
public static java.util.List convertElementsSyndCategoryToSubject(java.util.List cList)
cList
- the list with SyndCategory elements to convert to subject list.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |