Class PropVerification

  • All Implemented Interfaces:
    IKStringInfoProviderHolder

    public final class PropVerification
    extends java.lang.Object
    implements IKStringInfoProviderHolder
    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​(IKStringInfoProvider provider)
        Creates the verification instance.
        Parameters:
        provider - Specifies the KString information provider.
        Throws:
        java.lang.NullPointerException - If provider is null.
    • 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​(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.