-
- 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 parentTreeItem
of the element subject of the function call, and the second the value of element itself.This is a
FunctionalInterface
whose 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 aTreeItemPredicate
from a givenPredicate
.boolean
test(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 parentTreeItem
of the element ornull
if there is no parent.value
- The value to be tested.- Returns:
true
if the input argument matches the predicate.
-
create
static <T> TreeItemPredicate<T> create(Predicate<T> predicate)
Utility method to create aTreeItemPredicate
from a givenPredicate
.- Type Parameters:
T
- The type of the value.- Parameters:
predicate
- ThePredicate
to be wrapped.- Returns:
- A new
TreeItemPredicate
wrapped around the givenpredicate
.
-
-