javax.slee
Class AddressScreening

java.lang.Object
  |
  +--javax.slee.AddressScreening
All Implemented Interfaces:
java.io.Serializable

public final class AddressScreening
extends java.lang.Object
implements java.io.Serializable

This class defines an enumerated type that encapsulates the values defining whether an address has been screened by a user application. The application can choose one of these constants depending on whether it has screened the address and the outcome received.

A singleton instance of each enumerated value is guaranteed (via an implementation of readResolve() - refer java.io.Serializable), so that equality tests using == are always evaluated correctly. (This equality test is only guaranteed if this class is loaded in the application's boot class path, rather than dynamically loaded at runtime.)

See Also:
Address, Serialized Form

Field Summary
static int ADDRESS_SCREENING_NETWORK
          An integer representation of NETWORK.
static int ADDRESS_SCREENING_UNDEFINED
          An integer representation of UNDEFINED.
static int ADDRESS_SCREENING_USER_NOT_VERIFIED
          An integer representation of USER_NOT_VERIFIED.
static int ADDRESS_SCREENING_USER_VERIFIED_FAILED
          An integer representation of USER_VERIFIED_FAILED.
static int ADDRESS_SCREENING_USER_VERIFIED_PASSED
          An integer representation of USER_VERIFIED_PASSED.
static AddressScreening NETWORK
          The NETWORK value indicates that the address is a network or application provided address.
static AddressScreening UNDEFINED
          The UNDEFINED value indicates that the address screening is undefined.
static AddressScreening USER_NOT_VERIFIED
          The USER_NOT_VERIFIED value indicates that the user-provided address has not been verified.
static AddressScreening USER_VERIFIED_FAILED
          The USER_VERIFIED_FAILED value indicates that the user-provider address has been verified but failed.
static AddressScreening USER_VERIFIED_PASSED
          The USER_VERIFIED_PASSED value indicates that the user-provided address has been verified and passed.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this address screening for equality with another.
static AddressScreening fromInt(int value)
          Get an AddressScreening object from an integer value.
 int hashCode()
          Get a hash code value for this address screening.
 boolean isNetwork()
          Determine if this AddressScreening object represents the NETWORK address screening value.
 boolean isUndefined()
          Determine if this AddressScreening object represents the UNDEFINED address screening value.
 boolean isUserNotVerified()
          Determine if this AddressScreening object represents the USER_NOT_VERIFIED address screening value.
 boolean isUserVerifiedFailed()
          Determine if this AddressScreening object represents the USER_VERIFIED_FAILED address screening value.
 boolean isUserVerifiedPassed()
          Determine if this AddressScreening object represents the USER_VERIFIED_PASSED address screening value.
 int toInt()
          Get an integer value representation for this AddressScreening object.
 java.lang.String toString()
          Get the textual representation of the address screening object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDRESS_SCREENING_UNDEFINED

public static final int ADDRESS_SCREENING_UNDEFINED
An integer representation of UNDEFINED.

ADDRESS_SCREENING_USER_NOT_VERIFIED

public static final int ADDRESS_SCREENING_USER_NOT_VERIFIED
An integer representation of USER_NOT_VERIFIED.

ADDRESS_SCREENING_USER_VERIFIED_PASSED

public static final int ADDRESS_SCREENING_USER_VERIFIED_PASSED
An integer representation of USER_VERIFIED_PASSED.

ADDRESS_SCREENING_USER_VERIFIED_FAILED

public static final int ADDRESS_SCREENING_USER_VERIFIED_FAILED
An integer representation of USER_VERIFIED_FAILED.

ADDRESS_SCREENING_NETWORK

public static final int ADDRESS_SCREENING_NETWORK
An integer representation of NETWORK.

UNDEFINED

public static final AddressScreening UNDEFINED
The UNDEFINED value indicates that the address screening is undefined.

USER_NOT_VERIFIED

public static final AddressScreening USER_NOT_VERIFIED
The USER_NOT_VERIFIED value indicates that the user-provided address has not been verified.

USER_VERIFIED_PASSED

public static final AddressScreening USER_VERIFIED_PASSED
The USER_VERIFIED_PASSED value indicates that the user-provided address has been verified and passed.

USER_VERIFIED_FAILED

public static final AddressScreening USER_VERIFIED_FAILED
The USER_VERIFIED_FAILED value indicates that the user-provider address has been verified but failed.

NETWORK

public static final AddressScreening NETWORK
The NETWORK value indicates that the address is a network or application provided address.
Method Detail

fromInt

public static AddressScreening fromInt(int value)
                                throws java.lang.IllegalArgumentException
Get an AddressScreening object from an integer value.
Parameters:
value - the address screening value as an integer.
Returns:
an AddressScreening object corresponding to value.
Throws:
java.lang.IllegalArgumentException - if value is not a valid address screening value.

toInt

public int toInt()
Get an integer value representation for this AddressScreening object.
Returns:
an integer value representation for this AddressScreening object.

isUndefined

public boolean isUndefined()
Determine if this AddressScreening object represents the UNDEFINED address screening value.

This method is effectively equivalent to the conditional test: (this == UNDEFINED), ie. the code:

    if (screening.isUndefined()) ...

is interchangeable with the code:

   if (screening == AddressScreening.UNDEFINED) ...

Returns:
true if this object represents the UNDEFINED address screening value, false otherwise.

isUserNotVerified

public boolean isUserNotVerified()
Determine if this AddressScreening object represents the USER_NOT_VERIFIED address screening value.

This method is effectively equivalent to the conditional test: (this == USER_NOT_VERIFIED), ie. the code:

    if (screening.isUserNotVerified()) ...

is interchangeable with the code:

   if (screening == AddressScreening.USER_NOT_VERIFIED) ...

Returns:
true if this object represents the USER_NOT_VERIFIED address screening value, false otherwise.

isUserVerifiedPassed

public boolean isUserVerifiedPassed()
Determine if this AddressScreening object represents the USER_VERIFIED_PASSED address screening value.

This method is effectively equivalent to the conditional test: (this == USER_VERIFIED_PASSED), ie. the code:

    if (screening.isUserVerifiedPassed()) ...

is interchangeable with the code:

   if (screening == AddressScreening.USER_VERIFIED_PASSED) ...

Returns:
true if this object represents the USER_VERIFIED_PASSED address screening value, false otherwise.

isUserVerifiedFailed

public boolean isUserVerifiedFailed()
Determine if this AddressScreening object represents the USER_VERIFIED_FAILED address screening value.

This method is effectively equivalent to the conditional test: (this == USER_VERIFIED_FAILED), ie. the code:

    if (screening.isUserVerifiedFailed()) ...

is interchangeable with the code:

   if (screening == AddressScreening.USER_VERIFIED_FAILED) ...

Returns:
true if this object represents the USER_VERIFIED_FAILED address screening value, false otherwise.

isNetwork

public boolean isNetwork()
Determine if this AddressScreening object represents the NETWORK address screening value.

This method is effectively equivalent to the conditional test: (this == NETWORK), ie. the code:

    if (screening.isNetword()) ...

is interchangeable with the code:

   if (screening == AddressScreening.NETWORK) ...

Returns:
true if this object represents the NETWORK address screening value, false otherwise.

equals

public boolean equals(java.lang.Object obj)
Compare this address screening for equality with another.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this with.
Returns:
true if obj is an instance of this class representing the same address screening value as this, false otherwise.

hashCode

public int hashCode()
Get a hash code value for this address screening.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value.

toString

public java.lang.String toString()
Get the textual representation of the address screening object.
Overrides:
toString in class java.lang.Object
Returns:
the textual representation of the address screening object.