Package com.iizix.prop
Class PropError
java.lang.Object
com.iizix.prop.PropError
- All Implemented Interfaces:
- Cloneable
Class used to hold errors for a property.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static IPropErrorItem[]An empty array.- static final StringProperty errors with an ID starting with this string are circular reference errors or crossovers into circular references.
- Constructor SummaryConstructorsConstructorDescription- PropError- (IPropErrorItem item) Creates a new instance of the errors property initialized with one errors item.- PropError- (IPropErrorItem[] items) Creates a new instance of the errors property initialized with one errors item.
- Method SummaryModifier and TypeMethodDescription- boolean- assign- (PropVerificationError[] verifyErrors) Assigns the verification errors.- clone()Clones this instance.- booleanVerification of equality, except the specified the specified ID's.- booleanChecks if two PropError's are equal, i.e.Gets the error input item with specified ID, for none specify empty string.- getAll()Gets all the errors in an array.- intGets the maximum severity of this property error instance.- booleanChecks if there is any presence of a circular reference error.- boolean- isEmpty()Checks if the error items are empty.- toString()Formats the error input to a string.
- Field Details- PROP_ERROR_ID_CIRCULAR_REFERENCEProperty errors with an ID starting with this string are circular reference errors or crossovers into circular references.- See Also:
 
- EMPTYAn empty array.
 
- Constructor Details- PropErrorCreates a new instance of the errors property initialized with one errors item.- Parameters:
- item- An input error item.
- Throws:
- NullPointerException- If input or message is null.
 
- PropErrorCreates a new instance of the errors property initialized with one errors item.- Parameters:
- items- An array of input error items.
- Throws:
- NullPointerException- If input or message is null.
 
 
- Method Details- getSeveritypublic int getSeverity()Gets the maximum severity of this property error instance.- Returns:
- -1 if no errors, otherwise IPropErrorItem.INFO=0, WARNING=1 or ERROR=2.
 
- isEmptypublic boolean isEmpty()Checks if the error items are empty.
- hasCircularReferencesErrorpublic boolean hasCircularReferencesError()Checks if there is any presence of a circular reference error.- Returns:
- trueif there is at least one circular reference error, or a crossover to a circular reference,- falseotherwise.
 
- getGets the error input item with specified ID, for none specify empty string.- Parameters:
- id- The ID for the error, can be empty string (null means default empty string).
- Returns:
- The error item for the ID, or null for not found.
 
- getAllGets all the errors in an array.- Returns:
- An array copy of the errors, never null.
 
- assignAssigns the verification errors.- Parameters:
- verifyErrors- The set of verification errors.
- Returns:
- true for changes, false for no change.
 
- toStringFormats the error input to a string.
- cloneClones this instance.
- equalsChecks if two PropError's are equal, i.e. that the errors are all present, ordering doesn't matter.
- equalsVerification of equality, except the specified the specified ID's.- Parameters:
- pe- Compare with this error property.
- ignoredIDs- Ignored error IDs.
- Returns:
- true if equal, false otherwise.