MOEA Framework 2.12
API Specification

org.moeaframework.util.grammar
Class Production

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

public class Production
extends Object

A context-free grammar production.

See Also:
ContextFreeGrammar, Rule, Symbol

Constructor Summary
Production()
          Constructs an empty production.
 
Method Summary
 void add(Symbol symbol)
          Adds a symbol to this production.
 Symbol get(int index)
          Returns the symbol at the specified index.
 int size()
          Returns the number of symbols contained in this production.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Production

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

Method Detail

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

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!