Class PropertyPredicate

  • All Implemented Interfaces:
    Predicate<NodeState>, java.util.function.Predicate<NodeState>

    public class PropertyPredicate
    extends java.lang.Object
    implements java.util.function.Predicate<NodeState>, Predicate<NodeState>
    Predicate on property values. This property holds if and only if the node has a property of the given name and the given propertyPredicate holds on that property.
    • Constructor Detail

      • PropertyPredicate

        public PropertyPredicate​(@NotNull
                                 @NotNull java.lang.String name,
                                 @NotNull
                                 @NotNull java.util.function.Predicate<PropertyState> propertyPredicate)
        Parameters:
        name - name of the property
        propertyPredicate - predicate on the named property
    • Method Detail

      • test

        public boolean test​(NodeState node)
        Specified by:
        test in interface java.util.function.Predicate<NodeState>
      • apply

        @Deprecated
        public boolean apply​(NodeState node)
        Deprecated.
        use test(NodeState) instead (see OAK-8874)
        Description copied from interface: Predicate
        Returns the result of applying this predicate to input. This method is generally expected, but not absolutely required, to have the following properties:
        • Its execution does not cause any observable side effects.
        • The computation is consistent with equals; that is, Objects.equal(a, b) implies that predicate.apply(a) == predicate.apply(b)).
        Specified by:
        apply in interface Predicate<NodeState>