Class WholeObjectOperators

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

public final class WholeObjectOperators extends Object
THE set of whole-object operators - the operators that define what a value IS (its identity, ordering, text, set-ness and whole-state transfer) rather than what the type DOES. Use NAMES or IsWholeObjectOperator; never a second list.

Derived from OperatorFactory.BARE_DEFAULT_OPERATORS, the twelve the bare default operator writes from the fields (<=> == <> < <= > >= ? $ $$ #? :=:), extended with three that are always hand-written (E07220) but are of the same kind: <~> (the fuzzy form of <=>), :~: and :^: (merge and replace move the whole state, as :=: copies it).

Why the set exists (E11014, 2026-11-11): LCOM4 joins two methods when they read the same field. Every aggregate with fields must define ? (E07235), and a ?, ==, $ or :=: - generated or hand-written - reads EVERY field, so it joined every method into one group and hid every disconnected group behind it; conversely a hand-written one reading no field stood as a group of its own. These operators say nothing about how the type's behaviour is organised, so CohesionTracker leaves them out of the graph. Domain behaviour written as an operator (+ on a Money, contains, close over the type's resources, #</#> picking out part of a value) is still counted.

  • Field Details

    • NAMES

      public static final Set<String> NAMES
      The operator names, as written in EK9 source ("<=>", "?", ...).