Package mondrian.util
Class FilteredIterableList<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<T>
-
- 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
Nested Classes Modifier and Type Class Description 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
Constructors Constructor Description FilteredIterableList(List<? extends T> list, FilteredIterableList.Filter filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get(int index)
int
hashCode()
boolean
isEmpty()
ListIterator<T>
listIterator(int index)
int
size()
Object[]
toArray()
<T> T[]
toArray(T[] contents)
-
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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator
-
-
-
-
Constructor Detail
-
FilteredIterableList
public FilteredIterableList(List<? extends T> list, FilteredIterableList.Filter filter)
-
-
Method Detail
-
get
public T get(int index)
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIterator
in interfaceList<T>
- Specified by:
listIterator
in classAbstractSequentialList<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
- Specified by:
isEmpty
in interfaceList<T>
- Overrides:
isEmpty
in classAbstractCollection<T>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
toArray
public <T> T[] toArray(T[] contents)
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T>
- Specified by:
hashCode
in interfaceList<T>
- Overrides:
hashCode
in classAbstractList<T>
-
-