@FunctionalInterface public interface NodeEqualityPredicate
Generally, implementations of this interface should fulfil the same
requirements as the Object.equals(Object) contract.
| Modifier and Type | Field and Description |
|---|---|
static NodeEqualityPredicate |
EXACT
Represents an exact match.
|
static NodeEqualityPredicate |
IGNORE_EXPIRY_TIME
All attributes must match, except for the
expiry time, which is ignored. |
static NodeEqualityPredicate |
IGNORE_EXPIRY_TIME_AND_VALUE
All attributes must match, except for
value and the
expiry time, which are ignored. |
static NodeEqualityPredicate |
IGNORE_VALUE
All attributes must match, except for
value, which is ignored. |
static NodeEqualityPredicate |
IGNORE_VALUE_OR_IF_TEMPORARY
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
areEqual(@NonNull Node o1,
@NonNull Node o2)
Returns if the two nodes are equal.
|
default Predicate<Node> |
equalTo(Node node)
Returns a
Predicate, returning true if the tested node is equal
to the one given, according to the NodeEqualityPredicate. |
static final NodeEqualityPredicate EXACT
All attributes of the nodes must match for them to be considered equal.
static final NodeEqualityPredicate IGNORE_VALUE
value, which is ignored.static final NodeEqualityPredicate IGNORE_EXPIRY_TIME
expiry time, which is ignored.
Note that with this setting, whether a node is temporary or not is still considered.
static final NodeEqualityPredicate IGNORE_EXPIRY_TIME_AND_VALUE
value and the
expiry time, which are ignored.static final NodeEqualityPredicate IGNORE_VALUE_OR_IF_TEMPORARY
boolean areEqual(@NonNull Node o1, @NonNull Node o2)
This method should avoid making calls to Node.equals(Node, NodeEqualityPredicate)
with this as the second argument, directly or otherwise.
o1 - the first nodeo2 - the second nodedefault Predicate<Node> equalTo(Node node)
Predicate, returning true if the tested node is equal
to the one given, according to the NodeEqualityPredicate.node - the given node