Package com.inet.report
Class Validity
java.lang.Object
com.inet.report.Validity
- All Implemented Interfaces:
Serializable
This class hold the state of an checked object.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPossible error data if the object is not valid.getState()One of the possible StatesbooleanhasState(Validity.States... allowedStates) Checks whether thisValidityinstance has one of the given states
-
Constructor Details
-
Validity
Create a new Validity object.- Parameters:
state- the current statedata- possible error data- Throws:
IllegalArgumentException- if state is null- Since:
- 10.0
-
-
Method Details
-
getState
One of the possible States- Returns:
- a state, never null
- Since:
- 10.0
-
getErrorData
Possible error data if the object is not valid. Which data this are depends on the checked object.- Returns:
- the error details or null
- Since:
- 10.0
-
hasState
Checks whether thisValidityinstance has one of the given states- Parameters:
allowedStates- the states to be filtered- Returns:
- true, if the state is one of the allowed states
- Since:
- 10.1
-