Class Signature.PVbl

Enclosing class:
Signature

public static final class Signature.PVbl extends Signature.InnerSig
A signature representing a single variable inside a list or pattern, e.g. [x,y] in [x,y] or {x,y}.
  • Constructor Details

    • PVbl

      public PVbl()
  • Method Details

    • isSimple

      public boolean isSimple()
      Description copied from class: Signature
      Simple signatures like x or [x,y,z]
      Specified by:
      isSimple in class Signature
      Returns:
      true if it is simple
    • size

      public int size()
      Description copied from class: Signature
      Number of element in a compound signature
      Specified by:
      size in class Signature
      Returns:
      number of elements, 1 for variables
    • calculateArgs

      protected void calculateArgs(Stack<Object> stack, List<Object> args)
      Description copied from class: Signature
      Convert arguments on the stack to a list of arguments matching the pattern in this signature
      Specified by:
      calculateArgs in class Signature
      Parameters:
      stack - input arguments to the function
      args - output list of values matching the variables in the signature
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • calculateArgs

      protected void calculateArgs(Object obj, List<Object> args)
      Description copied from class: Signature.InnerSig
      Convert an input arguments to a list of arguments matching the pattern in this signature
      Specified by:
      calculateArgs in class Signature.InnerSig
      Parameters:
      obj - input argument, typically a Vector<Object>, VectorI or MatrixI. Nested vectors are extracted recursively.
      args - output list of values matching the variables in the signature
    • getSigs

      public List<Signature.InnerSig> getSigs()
      Description copied from class: Signature
      Return a list of signatures
      Specified by:
      getSigs in class Signature.InnerSig
      Returns:
      either a list or an empty list
    • match

      protected boolean match(Object x)
      Specified by:
      match in class Signature
    • match

      protected boolean match(Object x, Object y)
      Specified by:
      match in class Signature
    • matchN

      public boolean matchN(Object[] args)
      Specified by:
      matchN in class Signature