Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdom
Class ContentList.FilterListIterator

    java.lang.Object
      org.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

Field Summary
`private boolean` | `canremove` Whether a call to remove() is valid
`private boolean` | `canset` Whether a call to set() is valid
`private int` | `cursor` Index in backing list of next object
`private int` | `expected` Expected modCount in our backing list
`(package private) Filter` | `filter` The Filter that applies
`private boolean` | `forward` Whether this iterator is in forward or reverse.
`private int` | `fsize` Number of elements matching the filter.
`private int` | `index` Index in ListIterator
`private int` | `tmpcursor` the backing index to use if we actually DO move

Constructor Summary
`ContentList.FilterListIterator(Filter filter, int start)` Default constructor

Method Summary
`void` | `add(java.lang.Object obj)` Inserts the specified element into the list.
`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 void` | `checkConcurrentModification()` Check if are backing list is being modified by someone else.
`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 the last call to `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

    Filter filter

  The Filter that applies

### forward

    private boolean forward

  Whether this iterator is in forward or reverse.

### canremove

    private boolean canremove

  Whether a call to remove() is valid

### canset

    private boolean canset

  Whether a call to set() is valid

### cursor

    private int cursor

  Index in backing list of next object

### tmpcursor

    private int tmpcursor

  the backing index to use if we actually DO move

### index

    private int index

  Index in ListIterator

### expected

    private int expected

  Expected modCount in our backing list

### fsize

    private int fsize

  Number of elements matching the filter.

Constructor Detail

### ContentList.FilterListIterator

    ContentList.FilterListIterator(Filter filter,
                                   int start)

  Default constructor

Method Detail

### hasNext

    public boolean hasNext()

  Returns `true` if this list iterator has a next element.

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Specified by:
    `hasNext` in interface `java.util.ListIterator`

### next

    public java.lang.Object next()

  Returns the next element in the list.

  Specified by:
    `next` in interface `java.util.Iterator`
  Specified by:
    `next` in interface `java.util.ListIterator`

### hasPrevious

    public boolean hasPrevious()

  Returns `true` if this list iterator has more elements when traversing the list in the reverse direction.

  Specified by:
    `hasPrevious` in interface `java.util.ListIterator`

### previous

    public java.lang.Object previous()

  Returns the previous element in the list.

  Specified by:
    `previous` in interface `java.util.ListIterator`

### nextIndex

    public int nextIndex()

  Returns the index of the element that would be returned by a subsequent call to `next`.

  Specified by:
    `nextIndex` in interface `java.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:
    `previousIndex` in interface `java.util.ListIterator`

### add

    public void add(java.lang.Object obj)

  Inserts the specified element into the list.

  Specified by:
    `add` in interface `java.util.ListIterator`

### remove

    public void remove()

  Removes from the list the last element that was returned by the last call to `next` or `previous`.

  Specified by:
    `remove` in interface `java.util.Iterator`
  Specified by:
    `remove` in interface `java.util.ListIterator`

### set

    public void set(java.lang.Object obj)

  Replaces the last element returned by `next` or `previous` with the specified element.

  Specified by:
    `set` in interface `java.util.ListIterator`

### checkConcurrentModification

    private void checkConcurrentModification()

  Check if are backing list is being modified by someone else.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD