Package ml.options

Interface XMLConstraint

  • All Superinterfaces:
    Constraint
    All Known Implementing Classes:
    ExclusiveConstraint, ValueConstraint

    public interface XMLConstraint
    extends Constraint
    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 Detail

      • init

        void init​(Constrainable constrainable,
                  java.util.List<org.jdom.Element> list)
        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 of Constrainable 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 - The Constrainable instance to which this constraint applies
        list - 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.