Class Expr.Lit
- java.lang.Object
-
- at.jku.ssw.fp.sect04_4.visitor_fp.Expr
-
- at.jku.ssw.fp.sect04_4.visitor_fp.Expr.Lit
-
-
Field Summary
Fields Modifier and Type Field Description boolean
value
The value of this literal expression
-
Constructor Summary
Constructors Constructor Description Lit(boolean value)
Constructor for literals.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Consumer<Expr.Lit> litFn, Consumer<Expr.Var> varFn, Consumer<Expr.And> andFn, Consumer<Expr.Or> orFn, Consumer<Expr.Not> notFn)
Executes the action for theExpr.Lit
type.<R> R
apply(Function<Expr.Lit,R> litFn, Function<Expr.Var,R> varFn, Function<Expr.And,R> andFn, Function<Expr.Or,R> orFn, Function<Expr.Not,R> notFn)
Applies the function for theExpr.Lit
type.String
toString()
Returns a string representation.
-
-
-
Method Detail
-
toString
public String toString()
Returns a string representation.
-
apply
public <R> R apply(Function<Expr.Lit,R> litFn, Function<Expr.Var,R> varFn, Function<Expr.And,R> andFn, Function<Expr.Or,R> orFn, Function<Expr.Not,R> notFn)
Applies the function for theExpr.Lit
type.- Specified by:
apply
in classExpr
- Type Parameters:
R
- the type of the return value- Parameters:
litFn
- the function forExpr.Lit
objectsvarFn
- the function forExpr.Var
objectsandFn
- the function forExpr.And
objectsorFn
- the function forExpr.Or
objectsnotFn
- the function forExpr.Not
objects- Returns:
- the result of the function application
-
-