Class ConstraintRegistry


  • public class ConstraintRegistry
    extends Object
    A registry of constraints.
    Since:
    3.2
    Author:
    Derek Hulley
    • Method Detail

      • getInstance

        public static ConstraintRegistry getInstance()
        Returns:
        Returns the singleton
      • register

        public void register​(String name,
                             Constraint constraint)
        Register the constraint by name
      • getConstraint

        public Constraint getConstraint​(String name)
        Get the constraint by name
        Parameters:
        name - the name by which the constraint was registered
        Returns:
        Returns the constraint or null if it does not exist.