Interface Cfg.Annotatable<T>

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

public static sealed interface Cfg.Annotatable<T> permits Cfg.Element<T>, Cfg.Rule<T>
Interface for annotatable CFG types.
Since:
8.2
Version:
8.2
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the element annotation, might be null.
    at(Object annotation)
    Create a new copy of the CFG element, with the given annotation.
  • Method Details

    • annotation

      Return the element annotation, might be null.
      Returns:
      the annotation of the element, or null if the element has none
    • at

      Cfg.Annotatable<T> at(Object annotation)
      Create a new copy of the CFG element, with the given annotation.
      Parameters:
      annotation - the annotation of the newly created element, may be null
      Returns:
      a copy of the element with the given annotation