Enum Class Spelling

java.lang.Object
java.lang.Enum<Spelling>
com.darkcollective.relix.ast.Spelling
All Implemented Interfaces:
Serializable, Comparable<Spelling>, Constable

public enum Spelling extends Enum<Spelling>
Which of an operator's two spellings printed text uses.

Every operator is written either as a glyph (σ, ⋈, ≤) or as its ASCII form (SELECT, JOIN, <=), and the two parse to the same tree. Printing chooses one: GLYPHS, what the engine prints by default, reads like the algebra; KEYWORDS needs no special keyboard and is the form language/spellings.md recommends for generated code. Text printed either way parses back to the same tree.

Since:
1.0
  • Enum Constant Details

    • GLYPHS

      public static final Spelling GLYPHS
      The glyphs: σ amount > 100 (Orders).
    • KEYWORDS

      public static final Spelling KEYWORDS
      The ASCII forms: SELECT amount > 100 (Orders).
  • Method Details

    • values

      public static Spelling[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Spelling valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public String of(String glyph)
      How this spelling writes an operator.
      Parameters:
      glyph - an operator's glyph, such as σ; a symbol with no glyph of its own (=, <) is written the same either way
      Returns:
      glyph for GLYPHS; its ASCII form for KEYWORDS
      Since:
      1.0