prefuse.data.util
Class FilteredList<T extends Tuple<?>>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<T>
              extended by prefuse.data.util.FilteredList<T>
Type Parameters:
T -
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

public class FilteredList<T extends Tuple<?>>
extends java.util.AbstractSequentialList<T>

Filters a List based on a Predicate.

Author:
Anton Marsden

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FilteredList(java.util.List<T> l, Predicate predicate)
           
 
Method Summary
 boolean isEmpty()
           
 java.util.ListIterator<T> listIterator(int index)
           
 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, contains, containsAll, 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, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

FilteredList

public FilteredList(java.util.List<T> l,
                    Predicate predicate)
Method Detail

listIterator

public java.util.ListIterator<T> listIterator(int index)
Specified by:
listIterator in interface java.util.List<T extends Tuple<?>>
Specified by:
listIterator in class java.util.AbstractSequentialList<T extends Tuple<?>>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<T extends Tuple<?>>
Specified by:
isEmpty in interface java.util.List<T extends Tuple<?>>
Overrides:
isEmpty in class java.util.AbstractCollection<T extends Tuple<?>>

size

public int size()
Specified by:
size in interface java.util.Collection<T extends Tuple<?>>
Specified by:
size in interface java.util.List<T extends Tuple<?>>
Specified by:
size in class java.util.AbstractCollection<T extends Tuple<?>>


Copyright © 2008 Regents of the University of California