Class BooleanConstraint
- java.lang.Object
-
- science.aist.gtf.verification.syntactic.constraint.impl.BooleanConstraint
-
- All Implemented Interfaces:
BiFunction<Boolean,Field,ConstraintError>
,Constraint<Boolean>
public class BooleanConstraint extends Object implements Constraint<Boolean>
Constraint for checking if a boolean value is of given value
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
Fields Modifier and Type Field Description static ConstraintError
BooleanConstraintError
-
Constructor Summary
Constructors Constructor Description BooleanConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintError
apply(Boolean aBoolean, Field field)
Class<Boolean>
getType()
boolean
isBreakingConstraint()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Field Detail
-
BooleanConstraintError
public static final ConstraintError BooleanConstraintError
-
-
Method Detail
-
getType
public Class<Boolean> getType()
- Specified by:
getType
in interfaceConstraint<Boolean>
- Returns:
- method which returns the type for which the constraint is applied
-
isBreakingConstraint
public boolean isBreakingConstraint()
- Specified by:
isBreakingConstraint
in interfaceConstraint<Boolean>
- Returns:
- a flag if constraint is breaking and if violated no further constraints should be checked (e.q. because of a NullPointer)
-
apply
public ConstraintError apply(Boolean aBoolean, Field field)
- Specified by:
apply
in interfaceBiFunction<Boolean,Field,ConstraintError>
-
-