|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.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 Class |
m_clz
The class of Objects stored in the ListIterator. |
protected ListIterator |
m_iter
The underlying ListIterator. |
| Constructor Summary | |
|---|---|
RestrictedCollections.RestrictedListIterator(ListIterator iter,
Class clz)
Constructor. |
|
| Method Summary | |
|---|---|
void |
add(Object o)
Inserts the specified element into the list. |
protected void |
checkObject(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. |
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. |
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(Object o)
Replaces the last element returned by next or previous with the specified element. |
| Field Detail |
|---|
protected ListIterator m_iter
protected Class m_clz
| Constructor Detail |
|---|
public RestrictedCollections.RestrictedListIterator(ListIterator iter,
Class clz)
iter - the underlying ListIteratorclz - the class of objects that may be stored in the
ListIterator| Method Detail |
|---|
public boolean hasNext()
hasNext in interface IteratorhasNext in interface ListIteratorpublic Object next()
next in interface Iteratornext in interface ListIteratorpublic boolean hasPrevious()
hasPrevious in interface ListIteratorpublic Object previous()
previous in interface ListIteratorNoSuchElementException - if the iteration has no previous
elementpublic int nextIndex()
nextIndex in interface ListIteratorpublic int previousIndex()
previousIndex in interface ListIteratorpublic void remove()
remove in interface Iteratorremove in interface ListIteratorpublic void set(Object o)
set in interface ListIteratoro - the element with which to replace the last element
returned by next or previous
ClassCastException - if the class of the specified element
prevents it from being added to this listpublic void add(Object o)
add in interface ListIteratoro - the element to insert
ClassCastException - if the class of the specified element
prevents it from being added to this ListIteratorprotected void checkObject(Object o)
o - the Object to check
ClassCastException - if the class of the passed Object
prevents it from being stored in this
ListIterator
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||