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:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

public class FilteredIterableList<T>
extends java.util.AbstractSequentialList<T>

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

Since:
december, 2007
Version:
$Id: //open/mondrian/src/main/mondrian/util/FilteredIterableList.java#5 $
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(java.util.List<? extends T> list, FilteredIterableList.Filter filter)
           
 
Method Summary
 T get(int index)
           
 int hashCode()
           
 boolean isEmpty()
           
 java.util.ListIterator<T> listIterator(int index)
           
 int size()
           
 java.lang.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(java.util.List<? extends T> list,
                            FilteredIterableList.Filter filter)
Method Detail

get

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

listIterator

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

isEmpty

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

size

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

toArray

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

hashCode

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

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads