Class MirroredRelationalOperator

java.lang.Object
org.ek9lang.compiler.support.operators.MirroredRelationalOperator
All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>

public final class MirroredRelationalOperator extends Object implements UnaryOperator<String>
THE mirror of a relational operator glyph, for re-expressing a OP b as b OP' a: 5 > x is x < 5. < and > swap, as do <= and >=; every other operator (==, <>, ...) is returned unchanged. Hold one and apply it - the flow analysis's range narrowing and path conditions and the symbolic engine's divisor guards all ask it.

It was three identical copies: phase5.flow.RangeValue.flipOperator (static), and private mirror methods in phase5.flow.PathCondition and symbolic.SymbolicEngine; no-statics lane P1 (2026-10-29) made them one. Its sibling NormalisedRelationalOperator normalises a glyph rather than mirroring it.

  • Constructor Details

    • MirroredRelationalOperator

      public MirroredRelationalOperator()
  • Method Details

    • apply

      public String apply(String operator)
      The mirrored operator.
      Specified by:
      apply in interface Function<String,String>
      Parameters:
      operator - the comparison operator to mirror
      Returns:
      the mirrored operator, or the operator itself when it is not one of the four ordering glyphs