Interface Cfg.Symbol<T>

Type Parameters:
T - the terminal symbol value type
All Superinterfaces:
Cfg.Annotatable<T>, Cfg.Element<T>
All Known Implementing Classes:
Cfg.NonTerminal, Cfg.Terminal
Enclosing class:
Cfg<T>

public static sealed interface Cfg.Symbol<T> extends Cfg.Element<T> permits Cfg.Terminal<T>, Cfg.NonTerminal<T>
Represents the symbols the BNF grammar consists.
  • Method Summary

    Modifier and Type
    Method
    Description
    at(Object annotation)
    Create a new copy of the CFG element, with the given annotation.
    Return the name of the symbol.

    Methods inherited from interface io.jenetics.ext.grammar.Cfg.Annotatable

    annotation
  • Method Details

    • name

      Return the name of the symbol.
      Returns:
      the name of the symbol
    • at

      Cfg.Symbol<T> at(Object annotation)
      Description copied from interface: Cfg.Annotatable
      Create a new copy of the CFG element, with the given annotation.
      Specified by:
      at in interface Cfg.Annotatable<T>
      Parameters:
      annotation - the annotation of the newly created element, may be null
      Returns:
      a copy of the element with the given annotation