Package com.iizix.prop
Class PropVerification
java.lang.Object
com.iizix.prop.PropVerification
- All Implemented Interfaces:
IKStringInfoProviderHolder
Class used to hold information about errors of the property container verification process.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropVerificationError[]Empty list of errors.static final StringVerification error ID in the error property of the owner ("com.iizix.prop.verify").Constructor Summary
ConstructorsConstructorDescriptionPropVerification(IKStringInfoProvider provider) Creates the verification instance.Method Summary
Modifier and TypeMethodDescriptionvoidadd(PropVerificationError error) Adds an error.booleanadd(PropVerificationError error, boolean ignoreDups) Adds an error.Gets the list of errors.Gets the list of errors of a property.Gets the KString information provider used for e.g.booleanChecks if the verification list contains errors.
Field Details
EMPTY
Empty list of errors.ERROR_ID
Verification error ID in the error property of the owner ("com.iizix.prop.verify").- See Also:
Constructor Details
PropVerification
Creates the verification instance.- Parameters:
provider- Specifies the KString information provider.- Throws:
NullPointerException- Ifproviderisnull.
Method Details
getKStringInfoProvider
Gets the KString information provider used for e.g. resolving KString's.- Specified by:
getKStringInfoProviderin interfaceIKStringInfoProviderHolder- Returns:
- The provider, never
null.
add
Adds an error.- Parameters:
error- The error.- Throws:
InternalError- if the error ID already has been added for the property.
add
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 andignoreDupsis false.
getErrors
Gets the list of errors.- Returns:
- The list of errors.
getErrors
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.