i-net Clear Reports

com.inet.report
Class Validity

java.lang.Object
  extended by com.inet.report.Validity

public class Validity
extends java.lang.Object

This class hold the state of an checked object.


Nested Class Summary
static class Validity.States
          States of an object
 
Constructor Summary
Validity(Validity.States state, java.lang.Object data)
          Create a new Validity object.
 
Method Summary
 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
 

Constructor Detail

Validity

public Validity(Validity.States state,
                java.lang.Object data)
Create a new Validity object.

Parameters:
state - the current state
data - possible error data
Throws:
java.lang.IllegalArgumentException - if state is null
Since:
10.0
Method Detail

getState

public Validity.States getState()
One of the possible States

Returns:
a state, never null
Since:
10.0

getErrorData

public java.lang.Object 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

public boolean hasState(Validity.States[] allowedStates)
Checks whether this Validity instance 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

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH