Class BinaryOperator

All Implemented Interfaces:
Comparable<Item>, Iterable<Item>, Debug, Display
Direct Known Subclasses:
AndOperator, BitwiseAndOperator, BitwiseOrOperator, BitwiseXorOperator, DivideOperator, EqOperator, GeOperator, GtOperator, LeOperator, LtOperator, MinusOperator, ModuloOperator, NeOperator, OrOperator, PlusOperator, TimesOperator

public abstract class BinaryOperator extends Operator
An Operator that represents a binary operation, i.e. an operation on two operands.
  • Constructor Details

    • BinaryOperator

      public BinaryOperator(Item lhs, Item rhs)
  • Method Details

    • lhs

      public final Item lhs()
    • operator

      public abstract String operator()
      Returns the token that identifiers this Operator's operation. Used to uniquely identify the type of operation, and to aid serialization.
    • rhs

      public final Item rhs()
    • isConstant

      public boolean isConstant()
      Description copied from class: Item
      Returns true if this Item always evaluates to the same Item.
      Specified by:
      isConstant in class Item