|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.util.iterator.SingleElementListIterator<E>
public class SingleElementListIterator<E>
A SingleElementListIterator
holds a single element and returns it with the first
call to next()
, at which point it will return false
to any subsequent call
to hasNext()
. Likewise, it will return false
to a call to hasPrevious()
<
until a call to next()
, at which point a call to previous()
will return the
single element.
Constructor Summary | |
---|---|
SingleElementListIterator(E element)
Creates a new SingleElementListIterator that returns only the specified element. |
Method Summary | |
---|---|
void |
add(E item)
|
boolean |
hasNext()
|
boolean |
hasPrevious()
|
java.util.ListIterator<E> |
iterator()
|
E |
next()
|
int |
nextIndex()
|
E |
previous()
|
int |
previousIndex()
|
void |
remove()
|
void |
set(E item)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SingleElementListIterator(E element)
SingleElementListIterator
that returns only the specified element.
element
- The only element of this Iterator
Method Detail |
---|
public void add(E item)
add
in interface java.util.ListIterator<E>
public boolean hasNext()
hasNext
in interface java.util.Iterator<E>
hasNext
in interface java.util.ListIterator<E>
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator<E>
public java.util.ListIterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface IterableListIterator<E>
public E next()
next
in interface java.util.Iterator<E>
next
in interface java.util.ListIterator<E>
public int nextIndex()
nextIndex
in interface java.util.ListIterator<E>
public E previous()
previous
in interface java.util.ListIterator<E>
public int previousIndex()
previousIndex
in interface java.util.ListIterator<E>
public void remove()
remove
in interface java.util.Iterator<E>
remove
in interface java.util.ListIterator<E>
public void set(E item)
set
in interface java.util.ListIterator<E>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |