Class Production

java.lang.Object
org.moeaframework.util.grammar.Production

public class Production extends Object
A context-free grammar production.
See Also:
  • Constructor Details

    • Production

      public Production()
      Constructs an empty production. At least one symbol must be provided through the add(Symbol) method.
  • Method Details

    • add

      public void add(Symbol symbol)
      Adds a symbol to this production.
      Parameters:
      symbol - the symbol to be added
    • size

      public int size()
      Returns the number of symbols contained in this production.
      Returns:
      the number of symbols contained in this production
    • get

      public Symbol get(int index)
      Returns the symbol at the specified index.
      Parameters:
      index - the index of the symbol to be returned
      Returns:
      the symbol at the specified index