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:
  • 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