Class IsPartialBuiltIn

java.lang.Object
org.ek9lang.compiler.support.IsPartialBuiltIn
All Implemented Interfaces:
Predicate<ISymbol>

public final class IsPartialBuiltIn extends Object implements Predicate<ISymbol>
THE "is this a PARTIAL BUILT-IN" (PartialOrdering): a core built-in whose runtime class declares a comparison group (org.ek9.lang.ComparisonGroup) - its <=> is defined only within a group of its own values and unset between groups (a currency for Money, a unit suffix for Dimension). Only this kind gets phase 7's unset case for <? and >?. The compiler reads the declaration, it never lists type names. Hold one and ask it; the verdicts are shared by every instance (one per core type name, read once).
  • Constructor Details

    • IsPartialBuiltIn

      public IsPartialBuiltIn()
  • Method Details

    • test

      public boolean test(ISymbol type)
      True when the type is a core built-in whose runtime class declares a comparison group.
      Specified by:
      test in interface Predicate<ISymbol>
      Parameters:
      type - the type asked about, may be null
      Returns:
      true for Money and Dimension; false for everything else, user types included