Class MutableCollectionViews
java.lang.Object
org.aksw.commons.collections.MutableCollectionViews
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> Collection <U> convertingCollection(Collection<T> backend, com.google.common.base.Converter<T, U> converter) static <T,U> List <U> convertingList(List<T> backend, com.google.common.base.Converter<T, U> converter) static <T,U> Set <U> convertingSet(Set<T> backend, com.google.common.base.Converter<T, U> converter, boolean isInjective) static <T> Collection<T> filteringCollection(Collection<T> backend, com.google.common.base.Converter<? super T, ?> converter) Return a live-view of the given collection with conflicting elements filtered out.static <T> List<T> filteringList(List<T> backend, com.google.common.base.Converter<? super T, ?> converter) There is no guava Lists.filter() Reason: https://stackoverflow.com/questions/8458663/guava-why-is-there-no-lists-filter-functionstatic <T> Set<T> filteringSet(Set<T> backend, com.google.common.base.Converter<? super T, ?> converter) static <T> Set<T> wrapAsSet(Collection<T> collection)
-
Constructor Details
-
MutableCollectionViews
public MutableCollectionViews()
-
-
Method Details
-
filteringCollection
public static <T> Collection<T> filteringCollection(Collection<T> backend, com.google.common.base.Converter<? super T, ?> converter) Return a live-view of the given collection with conflicting elements filtered out. Conflicting elements are those for which the converter raises an exception.- Type Parameters:
T-- Parameters:
backend-converter-- Returns:
-
filteringSet
-
filteringList
public static <T> List<T> filteringList(List<T> backend, com.google.common.base.Converter<? super T, ?> converter) There is no guava Lists.filter() Reason: https://stackoverflow.com/questions/8458663/guava-why-is-there-no-lists-filter-function- Type Parameters:
T-- Parameters:
backend-converter-- Returns:
-
convertingCollection
public static <T,U> Collection<U> convertingCollection(Collection<T> backend, com.google.common.base.Converter<T, U> converter) -
convertingSet
-
convertingList
-
wrapAsSet
-