public class Validity
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Validity.States
States of an object
|
Constructor and Description |
---|
Validity(Validity.States state,
java.lang.Object data)
Create a new Validity object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getErrorData()
Possible error data if the object is not valid.
|
Validity.States |
getState()
One of the possible States
|
boolean |
hasState(Validity.States... allowedStates)
Checks whether this
Validity instance has one of the given states |
public Validity(Validity.States state, java.lang.Object data)
state
- the current statedata
- possible error datajava.lang.IllegalArgumentException
- if state is nullpublic Validity.States getState()
public java.lang.Object getErrorData()
public boolean hasState(Validity.States... allowedStates)
Validity
instance has one of the given statesallowedStates
- the states to be filteredCopyright © 1999-2020 by i-net software GmbH