|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.collections.iterators.SingletonListIterator
SingletonIterator
is an ListIterator
over a single
object instance.
Constructor Summary | |
SingletonListIterator(Object object)
Constructs a new SingletonListIterator . |
Method Summary | |
void |
add(Object obj)
Add always throws UnsupportedOperationException . |
boolean |
hasNext()
Is another object available from the iterator. |
boolean |
hasPrevious()
Is a previous object available from the iterator. |
Object |
next()
Get the next object from the iterator. |
int |
nextIndex()
Returns the index of the element that would be returned by a subsequent call to next. |
Object |
previous()
Get the previous object from the iterator. |
int |
previousIndex()
Returns the index of the element that would be returned by a subsequent call to previous. |
void |
remove()
Remove always throws UnsupportedOperationException . |
void |
set(Object obj)
Set sets the value of the singleton. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SingletonListIterator(Object object)
SingletonListIterator
.object
- the single object to return from the iteratorMethod Detail |
public boolean hasNext()
This returns true if the single object hasn't been returned yet.
public boolean hasPrevious()
This returns true if the single object has been returned.
public int nextIndex()
public int previousIndex()
public Object next()
This returns the single object if it hasn't been returned yet.
public Object previous()
This returns the single object if it has been returned.
public void remove()
UnsupportedOperationException
.public void add(Object obj)
UnsupportedOperationException
.public void set(Object obj)
obj
- the object to set
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |