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 ConstraintErrorBooleanConstraintError
-
Constructor Summary
Constructors Constructor Description BooleanConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintErrorapply(Boolean aBoolean, Field field)Class<Boolean>getType()booleanisBreakingConstraint()-
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:
getTypein interfaceConstraint<Boolean>- Returns:
- method which returns the type for which the constraint is applied
-
isBreakingConstraint
public boolean isBreakingConstraint()
- Specified by:
isBreakingConstraintin 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:
applyin interfaceBiFunction<Boolean,Field,ConstraintError>
-
-