Class MatcherInterface.Matcher

    • Constructor Detail

      • Matcher

        public Matcher​(XNode<IVar> target,
                       java.util.function.BiPredicate<XNode<? extends IVar>,​Integer> p)
        Builds a Matcher object with the specified target tree.
        Parameters:
        target - the target tree
        p - a predicate used for special nodes in some occasions
      • Matcher

        public Matcher​(XNode<IVar> target)
        Builds a Matcher object with the specified target tree.
        Parameters:
        target - the target tree
    • Method Detail

      • target

        public XNode<IVar> target()
        Description copied from interface: MatcherInterface
        Returns the target tree, which may possibly involve some form of abstraction by means of special nodes.
        Specified by:
        target in interface MatcherInterface
        Returns:
        the target tree
      • validForSpecialTargetNode

        public boolean validForSpecialTargetNode​(XNode<? extends IVar> node,
                                                 int level)
        Description copied from interface: MatcherInterface
        Returns true if the specified node (considered at the specified level/depth) is valid with respect to the target tree when assuming that the corresponding node in the target tree is a special node.
        Specified by:
        validForSpecialTargetNode in interface MatcherInterface
        Parameters:
        node - a (source) node
        level - the level/depth associated with the node
        Returns:
        true if the specified source node is valid with respect to a corresponding special node in the target tree