|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdom
Class ContentList.FilterListIterator

java.lang.Objectorg.jdom.ContentList.FilterListIterator
- All Implemented Interfaces:
- java.util.Iterator, java.util.ListIterator
- Enclosing class:
- ContentList
- class ContentList.FilterListIterator
- extends java.lang.Object
- implements java.util.ListIterator
- extends java.lang.Object
| Field Summary | |
(package private) int |
cursor
Index in backing list of next object |
(package private) int |
expected
Expected modCount in our backing list |
(package private) org.jdom.filter.Filter |
filter
The Filter that applies |
(package private) int |
initialCursor
Initial start index in backing list |
(package private) int |
last
Index in backing list of last object returned |
(package private) int |
lastOperation
The last operation performed |
| Constructor Summary | |
(package private) |
ContentList.FilterListIterator(org.jdom.filter.Filter filter,
int start)
Default constructor |
| Method Summary | |
void |
add(java.lang.Object obj)
Inserts the specified element into the list. |
private void |
checkConcurrentModification()
Check if are backing list is being modified by someone else. |
boolean |
hasNext()
Returns true if this list iterator has a next element. |
boolean |
hasPrevious()
Returns true if this list iterator has more
elements when traversing the list in the reverse direction. |
private int |
initializeCursor(int start)
Returns index in the backing list by moving forward start objects that match our filter. |
private int |
moveBackward(int start)
Returns index in the backing list of the next object matching our filter, starting at the given index and moving backwards. |
private int |
moveForward(int start)
Returns index in the backing list of the next object matching our filter, starting at the given index and moving forwards. |
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 obj)
Replaces the last element returned by next or
previous with the specified element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
filter
org.jdom.filter.Filter filter
- The Filter that applies
lastOperation
int lastOperation
- The last operation performed
initialCursor
int initialCursor
- Initial start index in backing list
cursor
int cursor
- Index in backing list of next object
last
int last
- Index in backing list of last object returned
expected
int expected
- Expected modCount in our backing list
| Constructor Detail |
ContentList.FilterListIterator
ContentList.FilterListIterator(org.jdom.filter.Filter filter, int start)
- Default constructor
| Method Detail |
hasNext
public boolean hasNext()
- Returns
trueif this list iterator has a next element.- Specified by:
hasNextin interfacejava.util.ListIterator
next
public java.lang.Object next()
- Returns the next element in the list.
- Specified by:
nextin interfacejava.util.ListIterator
hasPrevious
public boolean hasPrevious()
- Returns
trueif this list iterator has more elements when traversing the list in the reverse direction.- Specified by:
hasPreviousin interfacejava.util.ListIterator
previous
public java.lang.Object previous()
- Returns the previous element in the list.
- Specified by:
previousin interfacejava.util.ListIterator
nextIndex
public int nextIndex()
- Returns the index of the element that would be returned by a
subsequent call to
next.- Specified by:
nextIndexin interfacejava.util.ListIterator
previousIndex
public int previousIndex()
- Returns the index of the element that would be returned by a
subsequent call to
previous. (Returns -1 if the list iterator is at the beginning of the list.)- Specified by:
previousIndexin interfacejava.util.ListIterator
add
public void add(java.lang.Object obj)
- Inserts the specified element into the list.
- Specified by:
addin interfacejava.util.ListIterator
remove
public void remove()
- Removes from the list the last element that was returned by
nextorprevious. the last call tonextorprevious.- Specified by:
removein interfacejava.util.ListIterator
set
public void set(java.lang.Object obj)
- Replaces the last element returned by
nextorpreviouswith the specified element.- Specified by:
setin interfacejava.util.ListIterator
initializeCursor
private int initializeCursor(int start)
- Returns index in the backing list by moving forward start
objects that match our filter.
moveForward
private int moveForward(int start)
- Returns index in the backing list of the next object matching
our filter, starting at the given index and moving forwards.
moveBackward
private int moveBackward(int start)
- Returns index in the backing list of the next object matching
our filter, starting at the given index and moving backwards.
checkConcurrentModification
private void checkConcurrentModification()
- Check if are backing list is being modified by someone else.
|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jdom.ContentList.FilterListIterator