- All Known Implementing Classes:
- Codons
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for selecting a 
Cfg.Symbol by its index within a
 rule. It is an abstraction of the codon values used for selecting
 the alternatives from a rule during the sentence generation.- Since:
- 7.1
- Version:
- 7.1
- 
Method SummaryModifier and TypeMethodDescriptionintSelects an index with the given upperbound, exclusively.static SymbolIndexof(RandomGenerator random) Create a new symbol-index object from the given random generator.
- 
Method Details- 
nextSelects an index with the given upperbound, exclusively.- Parameters:
- rule- the rule which requested the index
- bound- the upper bound of the symbol index, exclusively
- Returns:
- the next symbol index
- Throws:
- IllegalArgumentException- if the given- boundis smaller than one
 
- 
ofCreate a new symbol-index object from the given random generator. This can be used for generating random sentences of derivation-trees.- Parameters:
- random- the random generator used for generating the sentences
- Returns:
- a new symbol-index object from the given random generator
- Throws:
- NullPointerException- if the given- randomgenerator is- null
 
 
-