Class ValidationRuleSet<V extends Validable>

  • Type Parameters:
    V - type of Validable
    All Implemented Interfaces:
    java.lang.Iterable<ValidationRule<?,​? super V>>

    public class ValidationRuleSet<V extends Validable>
    extends java.lang.Object
    implements java.lang.Iterable<ValidationRule<?,​? super V>>
    This is the set of rules beeing applicable to any instance of V class
    Inheritance is managed here
    • Field Detail

      • DELETED_PROPERTY

        public static final java.lang.String DELETED_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • ValidationRuleSet

        public ValidationRuleSet​(java.lang.Class<V> type)
    • Method Detail

      • getParentRuleSets

        public java.util.List<ValidationRuleSet<? super V>> getParentRuleSets()
      • addParentRuleSet

        protected void addParentRuleSet​(ValidationRuleSet<? super V> parentRuleSet)
      • getPropertyChangeSupport

        public java.beans.PropertyChangeSupport getPropertyChangeSupport()
      • getDeletedProperty

        public java.lang.String getDeletedProperty()
      • delete

        public void delete()
      • getDeclaredRules

        public java.util.List<ValidationRule<?,​V>> getDeclaredRules()
        Return declared rules for specified type
        Does not return inherited rules
        Returns:
      • getRules

        public java.util.List<ValidationRule<?,​? super V>> getRules()
        Build and return a collection of all rules for specified type
        Does return inherited rules (This method is really costfull and should not be called in a performance context, use getSize()/getElementAt(int) instead) FD: Beware, this method is necessary due to the way some GUI component get the validation rules, in normal code I would advocate the use of the iterator instead
        Returns:
      • containsRuleClass

        public boolean containsRuleClass​(java.lang.Class<? extends ValidationRule> ruleClass)
      • getRulesCount

        public int getRulesCount()
        Implements
        See Also:
        ListModel.getSize()
      • getDeclaredType

        public java.lang.Class<V> getDeclaredType()
      • getTypeName

        public java.lang.String getTypeName()
      • iterator

        public java.util.Iterator<ValidationRule<?,​? super V>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<V extends Validable>