au.gov.nehta.vendorlibrary.mdm.datatypes
Class XAD

java.lang.Object
  extended by au.gov.nehta.vendorlibrary.mdm.datatypes.XAD

public class XAD
extends java.lang.Object

XAD Encapsulates an extended address.


Nested Class Summary
static class XAD.Builder
          XAD.Builder Build class used to construct and validate an XAD object.
 
Method Summary
 java.lang.String getCity()
          Retrieve street address city.
 java.lang.String getCountry()
          Retrieve street address country.
 java.lang.String getFirstLine()
          Retrieve street address first line.
 int getPostCode()
          Retrieve street address post code.
 java.lang.String getSecondLine()
          Retrieve street address second line.
 java.lang.String getState()
          Retrieve street address state.
static XAD parse(java.lang.String parseValue)
          Parse XAD from string.
 java.lang.String toString()
          Outputs an XAD in the following format:

firstLine^secondLine^city^state^postCode^country

Variables that are not set are denoted by an empty string.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFirstLine

public java.lang.String getFirstLine()
Retrieve street address first line.

Returns:
street address first line.

getSecondLine

public java.lang.String getSecondLine()
Retrieve street address second line.

Returns:
street address second line.

getCity

public java.lang.String getCity()
Retrieve street address city.

Returns:
city.

getState

public java.lang.String getState()
Retrieve street address state.

Returns:
state.

getPostCode

public int getPostCode()
Retrieve street address post code.

Returns:
post code.

getCountry

public java.lang.String getCountry()
Retrieve street address country.

Returns:
country.

parse

public static XAD parse(java.lang.String parseValue)
Parse XAD from string.

Parameters:
parseValue - String to be parsed (not null).
Returns:
XAD

toString

public java.lang.String toString()
Outputs an XAD in the following format:

firstLine^secondLine^city^state^postCode^country

Variables that are not set are denoted by an empty string.

Trailing '^' symbols are trimmed. For example:

'firstLine^^city^state^postCode^' becomes 'firstLine^^city^state^postCode'

Overrides:
toString in class java.lang.Object
Returns:
Formatted string.