Package ml.options
Interface XMLConstraint
- All Superinterfaces:
Constraint
- All Known Implementing Classes:
ExclusiveConstraint
,ValueConstraint
Constraints implementing this interface have - beyond the
Constraint
interface - the capability
to be created through XML configuration files. In this case, a public no-arg constructor
is also required.-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(Constrainable constrainable, List<org.jdom.Element> list) This method is used to initialize a constraint based on data read from an XML configuration file.Methods inherited from interface ml.options.Constraint
isSatisfied, supports
-
Method Details
-
init
This method is used to initialize a constraint based on data read from an XML configuration file. The method is invoked internally during setup with the instance ofConstrainable
to which the constraint applies and a list of JDOM elements, which contain the details about the constraint itself.This method initializes the constraint and attaches it to the list of constraints of the
Constrainable
instance.- Parameters:
constrainable
- TheConstrainable
instance to which this constraint applieslist
- A list of JDOM elements to be used to initialize the constraint. Specifically, these are tags of the form<param name="..." value="..." />
containing key/value pairs with information. The expected pairs are specific to each implementation.
-