Class FilteringList<T, C extends List<T>>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
org.aksw.commons.collections.FilteringList<T,C>
- All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>
-
Field Summary
FieldsFields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) static <F, B, C extends Collection<B>>
Collection<F> createSafe(Collection<B> backend, com.google.common.base.Converter<B, F> converter) Wraps the backend with a guava filteredCollection that filters out items for which the converter raises an exceptionget(int index) iterator()listIterator(int index) intsize()Methods inherited from class AbstractList
clear, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, subListMethods inherited from class AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
backend
-
predicate
-
-
Constructor Details
-
FilteringList
-
-
Method Details
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<T>- Overrides:
listIteratorin classAbstractList<T>
-
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractList<T>
-
add
-
addAll
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceList<T>- Overrides:
addAllin classAbstractCollection<T>
-
addAll
-
set
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-
createSafe
public static <F, B, C extends Collection<B>> Collection<F> createSafe(Collection<B> backend, com.google.common.base.Converter<B, F> converter) Wraps the backend with a guava filteredCollection that filters out items for which the converter raises an exception- Type Parameters:
F-B-C-- Parameters:
backend-converter-- Returns:
-