public final class FilteredList<E> extends TransformationList<E,E>
TransformationList| Type | Property and Description |
|---|---|
ObjectProperty<Predicate<? super E>> |
predicate
The predicate that will match the elements that will be in this FilteredList.
|
modCount| Constructor and Description |
|---|
FilteredList(ObservableList<E> source)
Constructs a new FilteredList wrapper around the source list.
|
FilteredList(ObservableList<E> source,
Predicate<? super E> predicate)
Constructs a new FilteredList wrapper around the source list.
|
| Modifier and Type | Method and Description |
|---|---|
E |
get(int index)
Returns the element at the specified position in this list.
|
Predicate<? super E> |
getPredicate()
Gets the value of the property predicate.
|
int |
getSourceIndex(int index)
Maps the index of this list's element to an index in the direct source list.
|
ObjectProperty<Predicate<? super E>> |
predicateProperty()
The predicate that will match the elements that will be in this FilteredList.
|
void |
setPredicate(Predicate<? super E> predicate)
Sets the value of the property predicate.
|
int |
size()
Returns the number of elements in this list.
|
protected void |
sourceChanged(ListChangeListener.Change<? extends E> c)
Called when a change from the source is triggered.
|
getSource, getSourceIndexFor, isInTransformationChainaddAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, remove, removeAll, removeListener, removeListener, retainAll, setAll, setAlladd, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addListener, filtered, remove, removeAll, removeListener, retainAll, setAll, setAll, sorted, sortedadd, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamaddListener, removeListenerpublic final ObjectProperty<Predicate<? super E>> predicateProperty
getPredicate(),
setPredicate(Predicate)public FilteredList(ObservableList<E> source, Predicate<? super E> predicate)
source - the source listpredicate - the predicate to match the elements or null to match all elements.public FilteredList(ObservableList<E> source)
This constructor might be useful if you want to bind predicateProperty()
of this list.
source - the source listpublic final ObjectProperty<Predicate<? super E>> predicateProperty()
getPredicate(),
setPredicate(Predicate)public final Predicate<? super E> getPredicate()
public final void setPredicate(Predicate<? super E> predicate)
protected void sourceChanged(ListChangeListener.Change<? extends E> c)
TransformationListsourceChanged in class TransformationList<E,E>c - the changepublic int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public E get(int index)
get in interface List<E>get in class AbstractList<E>index - index of the element to returnIndexOutOfBoundsExceptionpublic int getSourceIndex(int index)
TransformationListgetSourceIndex in class TransformationList<E,E>index - the index in this listTransformationList.getSource()Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.