Class PropVerification


  • public class PropVerification
    extends java.lang.Object
    Class used to hold information about errors of the property container verification process.
    Author:
    Christopher Mindus
    • Field Detail

      • ERROR_ID

        public static final java.lang.String ERROR_ID
        Verification error ID in the error property of the owner ("com.iizix.prop.verify").
        See Also:
        Constant Field Values
    • Constructor Detail

      • PropVerification

        public PropVerification()
        Creates the verification instance.
    • Method Detail

      • add

        public void add​(PropVerificationError error)
        Adds an error.
        Parameters:
        error - The error.
        Throws:
        java.lang.InternalError - if the error ID already has been added for the property.
      • add

        public boolean add​(PropVerificationError error,
                           boolean ignoreDups)
        Adds an error.
        Parameters:
        error - The error.
        ignoreDups - Ignores duplicates.
        Returns:
        true if added, false if ignored (already added).
        Throws:
        java.lang.InternalError - if the error ID already has been added for the property and ignoreDups is false.
      • getErrors

        public PropVerificationError[] getErrors()
        Gets the list of errors.
        Returns:
        The list of errors.
      • getErrors

        public PropVerificationError[] getErrors​(GProp<?> property)
        Gets the list of errors of a property.
        Parameters:
        property - The property.
        Returns:
        The list of errors.
      • hasErrors

        public boolean hasErrors()
        Checks if the verification list contains errors.
        Returns:
        true if errors are present, false otherwise.