mondrian.util
Class FilteredIterableList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<T>
              extended by mondrian.util.FilteredIterableList<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>

public class FilteredIterableList<T>
extends AbstractSequentialList<T>

Iterable list which filters undesirable elements. To be used instead of removing elements from an iterable list.

Since:
december, 2007
Author:
Luis F. Canals
 

Nested Class Summary
static interface FilteredIterableList.Filter<T>
          Filter to determine which elements should be shown.
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FilteredIterableList(List<? extends T> list, FilteredIterableList.Filter filter)
           
 
Method Summary
 T get(int index)
           
 int hashCode()
           
 boolean isEmpty()
           
 ListIterator<T> listIterator(int index)
           
 int size()
           
 Object[] toArray()
           
 
Methods inherited from class java.util.AbstractSequentialList
add, addAll, iterator, remove, set
 
Methods inherited from class java.util.AbstractList
add, clear, equals, indexOf, lastIndexOf, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, 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
 

Constructor Detail

FilteredIterableList

public FilteredIterableList(List<? extends T> list,
                            FilteredIterableList.Filter filter)
Method Detail

get

public T get(int index)
Specified by:
get in interface List<T>
Overrides:
get in class AbstractSequentialList<T>

listIterator

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

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T>
Specified by:
isEmpty in interface List<T>
Overrides:
isEmpty in class AbstractCollection<T>

size

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

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<T>
Specified by:
toArray in interface List<T>
Overrides:
toArray in class AbstractCollection<T>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<T>
Specified by:
hashCode in interface List<T>
Overrides:
hashCode in class AbstractList<T>

SourceForge.net_Logo