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