Class UnaryOperator

All Implemented Interfaces:
Comparable<Item>, Iterable<Item>, Debug, Display
Direct Known Subclasses:
BitwiseNotOperator, NegativeOperator, NotOperator, PositiveOperator

public abstract class UnaryOperator extends Operator
An Operator that represents a unary operation, i.e. an operation on one operand.
  • Constructor Details

    • UnaryOperator

      public UnaryOperator(Item operand)
  • Method Details

    • operand

      public final Item operand()
    • 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.
    • 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