Package ml.options
Interface Constraint
- All Known Subinterfaces:
XMLConstraint
- All Known Implementing Classes:
ExclusiveConstraint
,ValueConstraint
public interface Constraint
The interface for all constraints. Custom constraints need to implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether a constraint is satisfied.boolean
supports
(Constrainable constrainable) Indicates whether a constraint supports a given type ofConstrainable
-
Method Details
-
isSatisfied
boolean isSatisfied()Check whether a constraint is satisfied. This method can be invoked after a set of command line arguments has been analyzed such that the results are known for each option and option set.- Returns:
- A boolean to indicate whether a constraint is satisfied or not
-
supports
Indicates whether a constraint supports a given type ofConstrainable
- Parameters:
constrainable
-- Returns:
- A boolean to indicate whether this
Constrainable
is supported
-