-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface TreeItemPredicate<T>
Represents a predicate (boolean-valued function) of two arguments: the first is the parentTreeItemof the element subject of the function call, and the second the value of element itself.This is a
FunctionalInterfacewhose functional method istest(TreeItem, Object).- Author:
- claudio.rosati@esss.se
- See Also:
- Filtering a JavaFX TreeView
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> TreeItemPredicate<T>create(Predicate<T> predicate)Utility method to create aTreeItemPredicatefrom a givenPredicate.booleantest(TreeItem<T> parent, T value)Evaluates this predicate on the given arguments.
-
-
-
Method Detail
-
test
boolean test(TreeItem<T> parent, T value)
Evaluates this predicate on the given arguments.- Parameters:
parent- The parentTreeItemof the element ornullif there is no parent.value- The value to be tested.- Returns:
trueif the input argument matches the predicate.
-
create
static <T> TreeItemPredicate<T> create(Predicate<T> predicate)
Utility method to create aTreeItemPredicatefrom a givenPredicate.- Type Parameters:
T- The type of the value.- Parameters:
predicate- ThePredicateto be wrapped.- Returns:
- A new
TreeItemPredicatewrapped around the givenpredicate.
-
-