org.openmdx.base.collection
Class FilteringList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList
              extended by org.openmdx.base.collection.FilteringList
All Implemented Interfaces:
Iterable, Collection, List

public class FilteringList
extends AbstractSequentialList

Author:
hburger To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
protected  List list
           
protected  Selector selector
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected FilteringList(List list)
          The subclass must implement the Selector interface.
  FilteringList(List list, Selector selector)
          The method accept must be overridden if selector is null.
 
Method Summary
protected  boolean acceptAll()
           
 boolean contains(Object object)
           
 ListIterator listIterator(int index)
           
protected  void removeInternal(Object object, ListIterator iterator)
          Interceptable remove
 int size()
           
 
Methods inherited from class java.util.AbstractSequentialList
add, addAll, get, iterator, remove, set
 
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, 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, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

list

protected List list

selector

protected Selector selector
Constructor Detail

FilteringList

public FilteringList(List list,
                     Selector selector)
The method accept must be overridden if selector is null.

Parameters:
list -
selector -

FilteringList

protected FilteringList(List list)
The subclass must implement the Selector interface.

Parameters:
list -
selector - exception ClassCastException if the subclass is not an instance of Selector
Method Detail

removeInternal

protected void removeInternal(Object object,
                              ListIterator iterator)
                       throws ServiceException
Interceptable remove

Parameters:
object -
iterator -
Throws:
ServiceException

listIterator

public ListIterator listIterator(int index)
Specified by:
listIterator in interface List
Specified by:
listIterator in class AbstractSequentialList

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

contains

public boolean contains(Object object)
Specified by:
contains in interface Collection
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection

acceptAll

protected boolean acceptAll()


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.