Package org.moeaframework.util.grammar
Class Production
java.lang.Object
org.moeaframework.util.grammar.Production
A context-free grammar production.
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Production
public Production()Constructs an empty production. At least one symbol must be provided through theadd(Symbol)
method.
-
-
Method Details
-
add
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
Returns the symbol at the specified index.- Parameters:
index
- the index of the symbol to be returned- Returns:
- the symbol at the specified index
-