T
- The type of the collection's elements.S
- The type of this list.public static class FilterableList.Empty<T,S extends FilterableList<T,S>> extends java.util.AbstractList<T> implements FilterableList<T,S>
FilterableList
.FilterableList.AbstractBase<T,S extends FilterableList<T,S>>, FilterableList.Empty<T,S extends FilterableList<T,S>>
Constructor and Description |
---|
Empty() |
Modifier and Type | Method and Description |
---|---|
S |
filter(ElementMatcher<? super T> elementMatcher)
Filters any elements in this lists by the given
elementMatcher and returns a list that are matched
by the given matcher. |
T |
get(int index) |
T |
getOnly()
Returns the only element of this list.
|
int |
size() |
S |
subList(int fromIndex,
int toIndex) |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public T get(int index)
public int size()
public T getOnly()
IllegalStateException
is thrown.getOnly
in interface FilterableList<T,S extends FilterableList<T,S>>
public S filter(ElementMatcher<? super T> elementMatcher)
elementMatcher
and returns a list that are matched
by the given matcher.filter
in interface FilterableList<T,S extends FilterableList<T,S>>
elementMatcher
- The element matcher to match the elements of this list against.public S subList(int fromIndex, int toIndex)
subList
in interface java.util.List<T>
subList
in interface FilterableList<T,S extends FilterableList<T,S>>
subList
in class java.util.AbstractList<T>