Documentation of 'org.matheclipse.core.patternmatching.IPatternMatcher' Java class
IPatternMatcher
org.matheclipse.core.patternmatching

Class IPatternMatcher

    • Constructor Summary

      Constructors 
      Constructor and Description
      IPatternMatcher(IExpr lhsPatternExpr) 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract boolean apply(IExpr expr)
      Start pattern matching.
      java.lang.Object clone() 
      abstract IExpr eval(IExpr expr)
      Match the given left-hand-side and return an evaluated expression
      IExpr getLHS()
      Get the "left-hand-side" of a pattern-matching rule.
      abstract void getPatterns(java.util.List<IExpr> resultList, IExpr patternExpr)
      Returns the matched pattern in the order they appear in the pattern expression.
      IExpr getRHS()
      Get the "right-hand-side" of a pattern-matching rule.
      abstract boolean isRuleWithoutPatterns()
      Check if the pattern-matchings left-hand-side expression contains no patterns.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IPatternMatcher

        public IPatternMatcher(IExpr lhsPatternExpr)
    • Method Detail

      • getLHS

        public IExpr getLHS()
        Get the "left-hand-side" of a pattern-matching rule.
        Returns:
      • getRHS

        public IExpr getRHS()
        Get the "right-hand-side" of a pattern-matching rule.
        Returns:
        null if no right-hand-side is defined for the pattern matcher
      • getPatterns

        public abstract void getPatterns(java.util.List<IExpr> resultList,
                                         IExpr patternExpr)
        Returns the matched pattern in the order they appear in the pattern expression.
        Parameters:
        resultList - a list instance
        patternExpr - the expression which contains the pattern objects
      • isRuleWithoutPatterns

        public abstract boolean isRuleWithoutPatterns()
        Check if the pattern-matchings left-hand-side expression contains no patterns.
        Returns:
        true, if the given expression contains no patterns
      • apply

        public abstract boolean apply(IExpr expr)
        Start pattern matching.
        Specified by:
        apply in interface Predicate<IExpr>
        Parameters:
        expr -
        Returns:
        true if the expr matches the pattern-matchings left-hand-side expression.
      • eval

        public abstract IExpr eval(IExpr expr)
        Match the given left-hand-side and return an evaluated expression
        Parameters:
        expr -
        Returns:
        null if the match wasn't successful, the evaluated expression otherwise.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.