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