public final class AddressPresentation extends Object implements Serializable
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.)
Address,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static AddressPresentation |
ADDRESS_NOT_AVAILABLE
The ADDRESS_NOT_AVAILABLE value indicates that the address
is not available for presentation.
|
static String |
ADDRESS_NOT_AVAILABLE_STRING
A string representation of
ADDRESS_NOT_AVAILABLE. |
static int |
ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE
An integer representation of
ADDRESS_NOT_AVAILABLE. |
static int |
ADDRESS_PRESENTATION_ALLOWED
An integer representation of
ALLOWED. |
static int |
ADDRESS_PRESENTATION_RESTRICTED
An integer representation of
RESTRICTED. |
static int |
ADDRESS_PRESENTATION_UNDEFINED
An integer representation of
UNDEFINED. |
static AddressPresentation |
ALLOWED
The ALLOWED value indicates that the address presentation
is allowed.
|
static String |
ALLOWED_STRING
A string representation of
ALLOWED. |
static AddressPresentation |
RESTRICTED
The RESTRICTED value indicates that the address presentation
is restricted.
|
static String |
RESTRICTED_STRING
A string representation of
RESTRICTED. |
static AddressPresentation |
UNDEFINED
The UNDEFINED value indicates that the address presentation
is undefined.
|
static String |
UNDEFINED_STRING
A string representation of
UNDEFINED. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compare this address presentation for equality with another.
|
static AddressPresentation |
fromInt(int value)
Get an
AddressPresentation object from an integer value. |
static AddressPresentation |
fromString(String value)
Get an
AddressPresentation object from a string value. |
int |
hashCode()
Get a hash code value for this address presentation.
|
boolean |
isAddressNotAvailable()
Determine if this AddressPresentation object represents the ADDRESS_NOT_AVAILABLE address
presentation value.
|
boolean |
isAllowed()
Determine if this AddressPresentation object represents the ALLOWED address
presentation value.
|
boolean |
isRestricted()
Determine if this AddressPresentation object represents the RESTRICTED address
presentation value.
|
boolean |
isUndefined()
Determine if this AddressPresentation object represents the UNDEFINED address
presentation value.
|
int |
toInt()
Get an integer value representation for this
AddressPresentation object. |
String |
toString()
Get the textual representation of the address presentation object.
|
public static final int ADDRESS_PRESENTATION_UNDEFINED
UNDEFINED.public static final int ADDRESS_PRESENTATION_ALLOWED
ALLOWED.public static final int ADDRESS_PRESENTATION_RESTRICTED
RESTRICTED.public static final int ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE
ADDRESS_NOT_AVAILABLE.public static final String UNDEFINED_STRING
UNDEFINED.public static final String ALLOWED_STRING
ALLOWED.public static final String RESTRICTED_STRING
RESTRICTED.public static final String ADDRESS_NOT_AVAILABLE_STRING
ADDRESS_NOT_AVAILABLE.public static final AddressPresentation UNDEFINED
public static final AddressPresentation ALLOWED
public static final AddressPresentation RESTRICTED
public static final AddressPresentation ADDRESS_NOT_AVAILABLE
public static AddressPresentation fromInt(int value) throws IllegalArgumentException
AddressPresentation object from an integer value.value - the address presentation value as an integer.AddressPresentation object corresponding to value.IllegalArgumentException - if value is not a valid
address presentation value.public static AddressPresentation fromString(String value) throws NullPointerException, IllegalArgumentException
AddressPresentation object from a string value.value - the address presentation as a string, for example as returned by the
toString() method (case insensitive).AddressPresentation object corresponding to value.NullPointerException - if value is null.IllegalArgumentException - if value is not a valid
address presentation value.public int toInt()
AddressPresentation object.AddressPresentation object.public boolean isUndefined()
This method is effectively equivalent to the conditional test:
(this == UNDEFINED), ie. the code:
if (presentation.isUndefined()) ...
is interchangeable with the code:
if (presentation == AddressPresentation.UNDEFINED) ...
true if this object represents the UNDEFINED address presentation
value, false otherwise.public boolean isAllowed()
This method is effectively equivalent to the conditional test:
(this == ALLOWED), ie. the code:
if (presentation.isAllowed()) ...
is interchangeable with the code:
if (presentation == AddressPresentation.ALLOWED) ...
true if this object represents the ALLOWED address presentation
value, false otherwise.public boolean isRestricted()
This method is effectively equivalent to the conditional test:
(this == RESTRICTED), ie. the code:
if (presentation.isRestricted()) ...
is interchangeable with the code:
if (presentation == AddressPresentation.RESTRICTED) ...
true if this object represents the RESTRICTED address presentation
value, false otherwise.public boolean isAddressNotAvailable()
This method is effectively equivalent to the conditional test:
(this == ADDRESS_NOT_AVAILABLE), ie. the code:
if (presentation.isAddressNotAvailable()) ...
is interchangeable with the code:
if (presentation == AddressPresentation.ADDRESS_NOT_AVAILABLE) ...
true if this object represents the ADDRESS_NOT_AVAILABLE address presentation
value, false otherwise.public boolean equals(Object obj)
public int hashCode()