Class TypePredicate

java.lang.Object
org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate
All Implemented Interfaces:
Predicate<NodeState>

public class TypePredicate extends Object implements Predicate<NodeState>
Inheritance-aware node type predicate for node states.
Since:
Oak 0.11
  • Constructor Details

    • TypePredicate

      public TypePredicate(@NotNull @NotNull NodeState root, @NotNull @NotNull String name)
      Creates a predicate for checking whether a node state is an instance of the named node type. This is an O(1) operation in terms of item accesses.
      Parameters:
      root - root node state
      name - Oak name of the node type to check for
    • TypePredicate

      public TypePredicate(@NotNull @NotNull NodeState root, @NotNull @NotNull Iterable<String> names)
      Creates a predicate for checking whether a node state is an instance of any of the named node types. This is an O(n) operation in terms of item accesses, with n being the number of given node types.
      Parameters:
      root - root node state
      names - Oak names of the node types to check for
    • TypePredicate

      public TypePredicate(@NotNull @NotNull NodeState root, @NotNull @NotNull String[] names)
      Creates a predicate for checking whether a node state is an instance of any of the named node types. This is an O(n) operation in terms of item accesses, with n being the number of given node types.
      Parameters:
      root - root node state
      names - Oak names of the node types to check for
  • Method Details