|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.RestrictedCollections.RestrictedListIterator
public static class RestrictedCollections.RestrictedListIterator
A restricted ListIterator that requires its contents to be of a specified class.
Field Summary | |
---|---|
protected java.lang.Class |
m_clz The class of Objects stored in the ListIterator. |
protected java.util.ListIterator |
m_iter The underlying ListIterator. |
Constructor Summary | |
---|---|
RestrictedCollections.RestrictedListIterator(java.util.ListIterator iter, java.lang.Class clz) Constructor. |
Method Summary | |
---|---|
void |
add(java.lang.Object o) Inserts the specified element into the list. |
protected void |
checkObject(java.lang.Object o) Check the passed object to verify that it passes the restriction of this ListIterator. |
boolean |
hasNext() Returns true if this list iterator has more elements when traversing the list in the forward direction. |
boolean |
hasPrevious() Returns true if this list iterator has more elements when traversing the list in the reverse direction. |
java.lang.Object |
next() Returns the next element in the list. |
int |
nextIndex() Returns the index of the element that would be returned by a subsequent call to next. |
java.lang.Object |
previous() Returns the previous element in the list. |
int |
previousIndex() Returns the index of the element that would be returned by a subsequent call to previous. |
void |
remove() Removes from the list the last element that was returned by next or previous. |
void |
set(java.lang.Object o) Replaces the last element returned by next or previous with the specified element. |
Field Detail |
---|
protected java.util.ListIterator m_iter
protected java.lang.Class m_clz
Constructor Detail |
---|
public RestrictedCollections.RestrictedListIterator(java.util.ListIterator iter, java.lang.Class clz)
iter
- the underlying ListIteratorclz
- the class of objects that may be stored in the ListIteratorMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface java.util.ListIterator
public java.lang.Object next()
next
in interface java.util.Iterator
next
in interface java.util.ListIterator
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator
public java.lang.Object previous()
previous
in interface java.util.ListIterator
NoSuchElementException
- if the iteration has no previous elementpublic int nextIndex()
nextIndex
in interface java.util.ListIterator
public int previousIndex()
previousIndex
in interface java.util.ListIterator
public void remove()
remove
in interface java.util.Iterator
remove
in interface java.util.ListIterator
public void set(java.lang.Object o)
set
in interface java.util.ListIterator
o
- the element with which to replace the last element returned by next or previousjava.lang.ClassCastException
- if the class of the specified element prevents it from being added to this listpublic void add(java.lang.Object o)
add
in interface java.util.ListIterator
o
- the element to insertjava.lang.ClassCastException
- if the class of the specified element prevents it from being added to this ListIteratorprotected void checkObject(java.lang.Object o)
o
- the Object to checkjava.lang.ClassCastException
- if the class of the passed Object prevents it from being stored in this ListIterator
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |