Class PropVerification

java.lang.Object
com.iizix.prop.PropVerification
All Implemented Interfaces:
IKStringInfoProviderHolder

public final class PropVerification extends Object implements IKStringInfoProviderHolder
Class used to hold information about errors of the property container verification process.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • PropVerification

      public PropVerification(IKStringInfoProvider provider)
      Creates the verification instance.
      Parameters:
      provider - Specifies the KString information provider.
      Throws:
      NullPointerException - If provider is null.
  • Method Details

    • getKStringInfoProvider

      public IKStringInfoProvider getKStringInfoProvider()
      Gets the KString information provider used for e.g. resolving KString's.
      Specified by:
      getKStringInfoProvider in interface IKStringInfoProviderHolder
      Returns:
      The provider, never null.
    • add

      public void add(PropVerificationError error)
      Adds an error.
      Parameters:
      error - The error.
      Throws:
      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:
      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.