Class Expr.Not
- java.lang.Object
-
- at.jku.ssw.fp.sect04_4.visitor_fp.Expr
-
- at.jku.ssw.fp.sect04_4.visitor_fp.Expr.Not
-
-
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.Not
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.Not
type.String
toString()
Returns a string representation.
-
-
-
Field Detail
-
sub
public final Expr sub
The subexpression of this not-expression.
-
-
Constructor Detail
-
Not
public Not(Expr sub)
Constructor initializing the subexpression.- Parameters:
sub
- the subexpression
-
-
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.Not
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
-
-