Class ComparisonDyad

    • Constructor Detail

      • ComparisonDyad

        public ComparisonDyad​(int operatorType,
                              TokenPosition tokenPosition)
      • ComparisonDyad

        public ComparisonDyad​(int operatorType)
    • Method Detail

      • newEvaluate

        protected Object newEvaluate​(State state)
      • isLeftArgCD

        protected boolean isLeftArgCD()
      • isOpEquality

        protected boolean isOpEquality()
      • handleEquals

        protected Object handleEquals​(State state)
        In this case, we have A == B or A != B. Complications is that A or B may be comparison dyads. So there are 4 cases to handle
        Parameters:
        state -
        Returns:
      • getNodeType

        public int getNodeType()
        Description copied from interface: ExpressionInterface
        QDL is not strongly typed but Java is, so each node type should have a unique integer and conditionals should use that, not the instanceof operator. This allows for efficient programming with switch statements rather than a bevy of conditionals (potentially each of which gets done even if the correct case has been handled).
        Specified by:
        getNodeType in interface ExpressionInterface
        Overrides:
        getNodeType in class Dyad
        Returns: