Package com.singularsys.jep.configurableparser

# Class RangeOperator

java.lang.Object
com.singularsys.jep.Operator
com.singularsys.jep.configurableparser.RangeOperator

All Implemented Interfaces:
  `PrintVisitor.PrintRulesI`, `Serializable`

public class RangeOperator extends Operator implements PrintVisitor.PrintRulesI
Operators like `[ x .. y ]` with three symbols.

To add the operator use

      OperatorTable2 optab = new StandardOperatorTable2();
      Operator rangeOp = new RangeOperator("..", "[", "]", new Range(), Operator.BINARY+Operator.NOT_IN_PARSER);
      optab.insertOperator(OperatorTable2.SpecialOperators.RANGE , rangeOp, optab.getAssign());
      ConfigurableParser cp = new ConfigurableParserWithRange("..");
      Jep jep = new Jep(cp,optab);

Since:
  Jep 4.1
See Also:
  - `Range`
  - `ConfigurableParserWithRange`
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class com.singularsys.jep.Operator

  `ASSOCIATIVE, BINARY, COMMUTATIVE, COMPOSITE, EQUIVALENCE, flags, key, LEFT, name, NARY, NO_ARGS, NOT_IN_PARSER, pfmc, precedence, PREFIX, printSymbol, REFLEXIVE, RIGHT, SELF_INVERSE, SUFFIX, symbol, SYMMETRIC, TERNARY, TRANSITIVE, UNARY, USE_BINDING_FOR_PRINT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RangeOperator(String name, String leftBracket, String rightBracket, PostfixMathCommandI pfmc, int flags)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `append(Node node, PrintVisitor pv)`
  Prints the node in the form `LeftBracket leftChild name rightChild rightBracket`
  `String`
  `getLeftBracket()`
  `String`
  `getRightBracket()`

  ### Methods inherited from class com.singularsys.jep.Operator

  `addAltSymbol, duplicate, getAltSymbols, getBinaryInverseOp, getBinding, getFlags, getInverseOp, getKey, getName, getPFMC, getPrecedence, getPrintSymbol, getRootOp, getSymbol, isAssociative, isBinary, isCommutative, isComposite, isDistributiveOver, isEquivalence, isLeftBinding, isNary, isPrefix, isReflexive, isRightBinding, isSelfInverse, isSuffix, isSymmetric, isTernary, isTransitive, isUnary, notInParser, numArgs, setBinaryInverseOp, setDistributiveOver, setFlag, setInverseOp, setKey, setPFMC, setPrecedence, setPrintSymbol, setRootOp, setSymbol, toFullString, toString, useBindingForPrint`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### RangeOperator

    public RangeOperator(String name, String leftBracket, String rightBracket, PostfixMathCommandI pfmc, int flags)
    Constructor
    Parameters:
      `name` - the name of operator and symbol in middle of operator.
      `leftBracket` - left-hand bracket
      `rightBracket` - right-hand bracket
      `pfmc` - function to implement the behaviour
      `flags` - flags for operator

- ## Method Details

  - ### append

    public void append(Node node, PrintVisitor pv) throws JepException
    Prints the node in the form `LeftBracket leftChild name rightChild rightBracket`
    Specified by:
      `append` in interface `PrintVisitor.PrintRulesI`
    Parameters:
      `node` - the node to print
      `pv` - the PrintVisitor
    Throws:
      `JepException` - on error

  - ### getLeftBracket

    public String getLeftBracket()

  - ### getRightBracket

    public String getRightBracket()