Class FilteredObservableCollection<T>
java.lang.Object
java.util.AbstractCollection<T>
org.aksw.commons.collections.FilteringCollection<T, ObservableCollection<T>>
org.aksw.commons.collection.observable.FilteredObservableCollection<T>
- All Implemented Interfaces:
Iterable<T>, Collection<T>, DeltaCollection<T>, ObservableCollection<T>
public class FilteredObservableCollection<T>
extends FilteringCollection<T, ObservableCollection<T>>
implements ObservableCollection<T>
-
Field Summary
Fields inherited from class FilteringCollection
backend, predicate -
Constructor Summary
ConstructorsConstructorDescriptionFilteredObservableCollection(ObservableCollection<T> backend, Predicate<? super T> predicate) -
Method Summary
Modifier and TypeMethodDescriptionWhether to notify listenersbooleandelta(Collection<? extends T> rawAdditions, Collection<?> rawRemovals) Apply a delta thereby firing only a single eventstatic <T> CollectionChangedEvent<T> filter(Object self, CollectionChangedEvent<T> event, Predicate<? super T> predicate) / CollectionnewSet = newValues.stream().filter(predicate).collect(Collectors.toSet()); / backend.replace(newSet); Methods inherited from class FilteringCollection
add, contains, getBackend, getPredicate, iterator, remove, sizeMethods inherited from class AbstractCollection
addAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface DeltaCollection
replaceMethods inherited from interface ObservableCollection
convert, filter, map, mapToValue, mapToValue
-
Constructor Details
-
FilteredObservableCollection
public FilteredObservableCollection(ObservableCollection<T> backend, Predicate<? super T> predicate)
-
-
Method Details
-
delta
Description copied from interface:DeltaCollectionApply a delta thereby firing only a single event- Specified by:
deltain interfaceDeltaCollection<T>
-
filter
public static <T> CollectionChangedEvent<T> filter(Object self, CollectionChangedEvent<T> event, Predicate<? super T> predicate) / CollectionnewSet = newValues.stream().filter(predicate).collect(Collectors.toSet()); / backend.replace(newSet); -
addVetoableChangeListener
Description copied from interface:ObservableCollectionWhether to notify listeners- Specified by:
addVetoableChangeListenerin interfaceObservableCollection<T>
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfaceObservableCollection<T>
-