Class ComparisonOperators

java.lang.Object
org.ek9lang.compiler.support.ComparisonOperators

public final class ComparisonOperators extends Object
The canonical vocabulary of EK9 comparison-operator glyphs, as named subsets, so that PRE_IR checks reference a single source instead of hand-spelling (and silently diverging) their own switch/Set each time. The three subsets make the intended scope of each check EXPLICIT:
  • EQUALITY - equality / inequality only.
  • ORDERING_AND_EQUALITY - the relational and (in)equality operators, no fuzzy/spaceship/ text operators (used by the value-narrowing condition checks, which only reason about ordering).
  • ALL_COMPARISONS - every comparison operator including spaceship, fuzzy, contains and matches (used by the redundancy / magic-literal checks).
  • Field Details

    • EQUALITY

      public static final Set<String> EQUALITY
      Equality and inequality operators only.
    • ORDERING_AND_EQUALITY

      public static final Set<String> ORDERING_AND_EQUALITY
      Relational plus equality operators - no spaceship/fuzzy/text operators.
    • ALL_COMPARISONS

      public static final Set<String> ALL_COMPARISONS
      Every comparison operator: ordering and equality plus spaceship, fuzzy, contains and matches.