Class IntegerRangeConstraint
- java.lang.Object
-
- science.aist.gtf.verification.syntactic.constraint.impl.IntegerRangeConstraint
-
- All Implemented Interfaces:
BiFunction<Integer,Field,ConstraintError>
,Constraint<Integer>
public class IntegerRangeConstraint extends Object implements Constraint<Integer>
Constraint for checking if an integer is in between the bounds (inclusive)
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Field Summary
Fields Modifier and Type Field Description static ConstraintError
IntegerRangeError
-
Constructor Summary
Constructors Constructor Description IntegerRangeConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintError
apply(Integer integer, Field field)
Class<Integer>
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
-
IntegerRangeError
public static final ConstraintError IntegerRangeError
-
-
Method Detail
-
apply
public ConstraintError apply(Integer integer, Field field)
- Specified by:
apply
in interfaceBiFunction<Integer,Field,ConstraintError>
-
getType
public Class<Integer> getType()
- Specified by:
getType
in interfaceConstraint<Integer>
- Returns:
- method which returns the type for which the constraint is applied
-
isBreakingConstraint
public boolean isBreakingConstraint()
- Specified by:
isBreakingConstraint
in interfaceConstraint<Integer>
- Returns:
- a flag if constraint is breaking and if violated no further constraints should be checked (e.q. because of a NullPointer)
-
-