Class ContentList.FilterList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by ContentList.FilterList
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List
Enclosing class:
ContentList
 class ContentList.FilterList
extends java.util.AbstractList
implements java.io.Serializable

FilterList represents legal JDOM content, including content for Documents or Elements.

Field Summary
(package private)  intcount
          Current number of items in this view
(package private)  intexpected
          Expected modCount in our backing list
(package private)  Filterfilter
          The Filter
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ContentList.FilterList(Filter filter)
          Create a new instance of the FilterList with the specified Filter.
 
Method Summary
 voidadd(int index, java.lang.Object obj)
          Inserts the specified object at the specified position in this list.
 java.lang.Objectget(int index)
          Return the object at the specified offset.
private  intgetAdjustedIndex(int index)
          Return the adjusted index
 java.util.Iteratoriterator()
           
 java.util.ListIteratorlistIterator()
           
 java.util.ListIteratorlistIterator(int index)
           
 java.lang.Objectremove(int index)
          Remove the object at the specified offset.
 java.lang.Objectset(int index, java.lang.Object obj)
          Set the object at the specified location to the supplied object.
 intsize()
          Return the number of items in this list
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

filter

Filter filter
The Filter

count

int count
Current number of items in this view

expected

int expected
Expected modCount in our backing list

Constructor Detail

ContentList.FilterList

ContentList.FilterList(Filter filter)
Create a new instance of the FilterList with the specified Filter.

Method Detail

add

public void add(int index,
                java.lang.Object obj)
Inserts the specified object at the specified position in this list. Shifts the object currently at that position (if any) and any subsequent objects to the right (adds one to their indices).

Specified by:
add in interface java.util.List
Overrides:
add in class java.util.AbstractList
Parameters:
index - The location to set the value to.
obj - The object to insert into the list. throws IndexOutOfBoundsException if index < 0 || index > size()

get

public java.lang.Object get(int index)
Return the object at the specified offset.

Specified by:
get in interface java.util.List
Specified by:
get in class java.util.AbstractList
Parameters:
index - The offset of the object.
Returns:
The Object which was returned.

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.List
Overrides:
iterator in class java.util.AbstractList

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List
Overrides:
listIterator in class java.util.AbstractList

remove

public java.lang.Object remove(int index)
Remove the object at the specified offset.

Specified by:
remove in interface java.util.List
Overrides:
remove in class java.util.AbstractList
Parameters:
index - The offset of the object.
Returns:
The Object which was removed.

set

public java.lang.Object set(int index,
                            java.lang.Object obj)
Set the object at the specified location to the supplied object.

Specified by:
set in interface java.util.List
Overrides:
set in class java.util.AbstractList
Parameters:
index - The location to set the value to.
obj - The location to set the value to.
Returns:
The object which was replaced. throws IndexOutOfBoundsException if index < 0 || index >= size()

size

public int size()
Return the number of items in this list

Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List
Specified by:
size in class java.util.AbstractCollection
Returns:
The number of items in this list.

getAdjustedIndex

private final int getAdjustedIndex(int index)
Return the adjusted index

Parameters:
index - Index of in this view.
Returns:
True index in backing list