org.matheclipse.core.patternmatching
Class PatternMatcherAndInvoker
- java.lang.Object
-
- org.matheclipse.core.patternmatching.IPatternMatcher
-
- org.matheclipse.core.patternmatching.PatternMatcher
-
- org.matheclipse.core.patternmatching.PatternMatcherAndInvoker
-
public class PatternMatcherAndInvoker extends PatternMatcher
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.matheclipse.core.patternmatching.PatternMatcher
PatternMatcher.OrderlessMatcher
-
-
Constructor Summary
Constructors Constructor and Description PatternMatcherAndInvoker(IExpr leftHandSide, IFunctionEvaluator instance, java.lang.String methodName)Create a pattern-matching rule which invokes the method name in the given instance, if leftHandSide is matching.PatternMatcherAndInvoker(java.lang.String leftHandSide, IFunctionEvaluator instance, java.lang.String methodName)Create a pattern-matching rule which invokes the method name in the given instance, if leftHandSide is matching.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()booleanequals(java.lang.Object obj)Indicates whether another object is equal to this predicate.IExpreval(IExpr leftHandSide)Match the given left-hand-side and return an evaluated expressioninthashCode()-
Methods inherited from class org.matheclipse.core.patternmatching.PatternMatcher
apply, checkCondition, checkRHSCondition, equivalent, evalLeftHandSide, evalLeftHandSide, getCondition, getPatterns, isRuleWithoutPatterns, setCondition
-
Methods inherited from class org.matheclipse.core.patternmatching.IPatternMatcher
getLHS, getRHS
-
-
-
-
Constructor Detail
-
PatternMatcherAndInvoker
public PatternMatcherAndInvoker(IExpr leftHandSide, IFunctionEvaluator instance, java.lang.String methodName)
Create a pattern-matching rule which invokes the method name in the given instance, if leftHandSide is matching.- Parameters:
leftHandSide- could contain pattern expressions for "pattern-matching"instance- instance of an IFunctionEvaluator interfacemethod- method to call
-
PatternMatcherAndInvoker
public PatternMatcherAndInvoker(java.lang.String leftHandSide, IFunctionEvaluator instance, java.lang.String methodName)Create a pattern-matching rule which invokes the method name in the given instance, if leftHandSide is matching.- Parameters:
leftHandSide-instance-methodName-
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classPatternMatcher- Throws:
java.lang.CloneNotSupportedException
-
eval
public IExpr eval(IExpr leftHandSide)
Description copied from class:IPatternMatcherMatch the given left-hand-side and return an evaluated expression- Overrides:
evalin classPatternMatcher- Returns:
nullif the match wasn't successful, the evaluated expression otherwise.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:PredicateIndicates whether another object is equal to this predicate.Most implementations will have no reason to override the behavior of
Object.equals(java.lang.Object). However, an implementation may also choose to returntruewheneverobjectis aPredicatethat it considers interchangeable with this one. "Interchangeable" typically means thatthis.apply(t) == that.apply(t)for alltof typeT). Note that afalseresult from this method does not imply that the predicates are known not to be interchangeable.- Specified by:
equalsin interfacePredicate<IExpr>- Overrides:
equalsin classPatternMatcher
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPatternMatcher
-
-
DMelt 3.0 © DataMelt by jWork.ORG