java.lang.Object
io.jenetics.ext.grammar.Cfg.Expression.Builder<T>
- Type Parameters:
T- the terminal symbol value type
- Enclosing class:
Cfg.Expression<T>
Builder class for building rule expressions.
- Since:
- 8.2
-
Method Summary
Modifier and TypeMethodDescriptionadd(Cfg.Symbol<T> symbol) Add the givensymbolto the expression.Set the expression annotation.build()Create a new rule object.Add a non-terminal symbol to the expression.Add a non-terminal symbol to the expression.Add a non-terminal symbol to the expression.Add a non-terminal symbol to the expression.Add a non-terminal symbol to the expression.
-
Method Details
-
add
Add the givensymbolto the expression.- Parameters:
symbol- the expression symbol- Returns:
thisbuilder for method chaining
-
N
Add a non-terminal symbol to the expression.- Parameters:
name- the symbol nameannotation- the symbol annotation- Returns:
thisbuilder for method chaining
-
N
Add a non-terminal symbol to the expression.- Parameters:
name- the symbol name- Returns:
thisbuilder for method chaining
-
T
Add a non-terminal symbol to the expression.- Parameters:
name- the symbol namevalue- the symbol valueannotation- the symbol annotation- Returns:
thisbuilder for method chaining
-
T
Add a non-terminal symbol to the expression.- Parameters:
name- the symbol namevalue- the symbol value- Returns:
thisbuilder for method chaining
-
T
Add a non-terminal symbol to the expression.- Parameters:
name- the symbol name- Returns:
thisbuilder for method chaining- Throws:
ClassCastException- ifTis not a string
-
at
Set the expression annotation.- Parameters:
annotation- the expression annotation- Returns:
thisbuilder for method chaining
-
build
Create a new rule object.- Returns:
- a new rule object
-