PatternSequence
org.matheclipse.core.expression

Class PatternSequence

    • Method Detail

      • equals

        public boolean equals(Object obj)
        Description copied from interface: Element
        Test if this is equal to b.
        Specified by:
        equals in interface Element<IExpr>
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to b, else false.
      • getIndex

        public int getIndex()
        Description copied from interface: IPatternObject
        Get the pattern-matchers index in the PatternMap
        Specified by:
        getIndex in interface IPatternObject
        Returns:
      • hashCode

        public int hashCode()
        Description copied from interface: Element
        Hashcode of this Element.
        Specified by:
        hashCode in interface Element<IExpr>
        Overrides:
        hashCode in class Object
        Returns:
        the hashCode.
      • hierarchy

        public int hierarchy()
        A unique integer ID for the implementation of this expression
        Specified by:
        hierarchy in interface IExpr
        Returns:
        a unique integer id for the implementation of this expression
      • internalFormString

        public String internalFormString(boolean symbolsAsFactoryMethod,                        int depth)
        Description copied from interface: IExpr
        Return the internal Java form of this expression.
        Specified by:
        internalFormString in interface IExpr
        Overrides:
        internalFormString in class ExprImpl
        Parameters:
        symbolsAsFactoryMethod - if true use the F.symbol() method, otherwise print the symbol name.
        depth - the recursion depth of this call. 0 indicates "recurse without a limit".
      • setIndex

        public void setIndex(int i)
        Description copied from interface: IPatternObject
        Set the pattern-matchers index in the PatternMap
        Specified by:
        setIndex in interface IPatternObject
      • compareTo

        public int compareTo(IExpr obj)
        Compares this expression with the specified expression for order. Returns a negative integer, zero, or a positive integer as this expression is canonical less than, equal to, or greater than the specified expression.
        Specified by:
        compareTo in interface Element<IExpr>
        Specified by:
        compareTo in interface Comparable<IExpr>
        Specified by:
        compareTo in interface IExpr
        Returns:
        0 if this is equal to b, -1 if this is less then b, else +1.
      • head

        public ISymbol head()
        Description copied from interface: IExpr
        If this object is an instance of IAST get the first element (offset 0) of the IAST list (i.e. get(0) ).
        Specified by:
        head in interface IExpr
        Specified by:
        head in class ExprImpl
        Returns:
        the head of the expression, which must not be null.
      • isBlank

        public boolean isBlank()
        Description copied from interface: IPatternSequence
        Return true, if the expression is a blank sequence pattern
        Specified by:
        isBlank in interface IPatternSequence
        Returns:
      • isConditionMatchedSequence

        public boolean isConditionMatchedSequence(IAST sequence)
        Description copied from interface: IPatternSequence
        Return true, if all of the elements in the sequence fulfill the pattern sequences additional condition
        Specified by:
        isConditionMatchedSequence in interface IPatternSequence
        Returns:
      • variables2Slots

        public IExpr variables2Slots(Map<IExpr,IExpr> map,                    List<IExpr> variableList)
        Description copied from interface: IExpr
        Convert the variables (i.e. ISymbol's with lower case character in the 0-th position of their name) in this expression into Slot[] s.
        Specified by:
        variables2Slots in interface IExpr
        Overrides:
        variables2Slots in class ExprImpl
        Returns:
        null if the expression contains a variable with a '$' character in the 0-th position of its name and the math engine runs in server mode.
      • accept

        public <T> T accept(IVisitor<T> visitor)
        Accept a visitor with return type T
        Specified by:
        accept in interface IExpr
      • accept

        public boolean accept(IVisitorBoolean visitor)
        Accept a visitor with return type boolean
        Specified by:
        accept in interface IExpr
      • accept

        public int accept(IVisitorInt visitor)
        Accept a visitor with return type int
        Specified by:
        accept in interface IExpr
        Returns:
      • isDefault

        public boolean isDefault()
        Use default value, if no matching was found.
        Specified by:
        isDefault in interface IPatternSequence
        Returns:
      • isPatternExpr

        public final boolean isPatternExpr()
        Test if this expression or a subexpression is a pattern object. Used in pattern-matching; checks flags in IAST with flag IAST.CONTAINS_PATTERN_EXPR.
        Specified by:
        isPatternExpr in interface IExpr
        Overrides:
        isPatternExpr in class ExprImpl
      • isCase

        public boolean isCase(IExpr that)
        Groovy operator overloading

SCaVis 2.2 © jWork.ORG