Holger's
Java API

com.antelmann.crm
Class ImmutableSnailMailAddress

java.lang.Object
  extended by com.antelmann.crm.SnailMailAddress
      extended by com.antelmann.crm.ImmutableSnailMailAddress
All Implemented Interfaces:
XMLSerializable, DetailedString, Forgeable<SnailMailAddress>, Localizable, Serializable

public class ImmutableSnailMailAddress
extends SnailMailAddress

represents a special address that disables all setter methods

Since:
29.09.2008, 15:15:56
Author:
Holger Antelmann
See Also:
ImmutableGlobalAddress, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.antelmann.util.Localizable
Localizable.Adapter
 
Field Summary
 
Fields inherited from class com.antelmann.crm.SnailMailAddress
ADDRESS_FLAVOR
 
Constructor Summary
ImmutableSnailMailAddress(SnailMailAddress adr)
           
ImmutableSnailMailAddress(String fullAddress)
           
 
Method Summary
 void clearAll()
          allows to clear all fields of this address
 void importXML(InputStream source)
          The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.
 void setAllFrom(SnailMailAddress adr)
          copies the properties of the given object and applies them to this instance, so that its behavior in regards to the given object can be matched to the extend that the implementing class supports that behavior.
 void setCity(String city)
           
 void setCountry(String country)
          uses the ISO 3166 2-letter code
 String setFullAddress(String fullAddress)
          sets the address for the current Locale
 String setFullAddress(String fullAddress, Locale l)
          a non-null parameter is used to override how the address is constructed
 void setState(String state)
           
 void setStreet(String street)
          may contain multiple lines
 void setStreetNumber(String sn)
           
 void setTitle(String title)
          may contain multiple lines
 void setZip(String zip)
           
 
Methods inherited from class com.antelmann.crm.SnailMailAddress
equals, exportXML, getAddressString, getAddressString, getCity, getCountry, getCountryName, getCountryName, getFormattedAddress, getFormattedAddress, getFullAddress, getFullAddress, getFullAddressMap, getLocale, getState, getStreet, getStreetNumber, getTitle, getZip, hashCode, isEmpty, replaceEmptyStringsWithNull, requiresState, requiresState, sameAs, setFullAddressMap, setLocale, setLocale, toDetailedString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableSnailMailAddress

public ImmutableSnailMailAddress(SnailMailAddress adr)

ImmutableSnailMailAddress

public ImmutableSnailMailAddress(String fullAddress)
Method Detail

importXML

public void importXML(InputStream source)
               throws SAXException,
                      IOException
Description copied from interface: XMLSerializable
The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.

Specified by:
importXML in interface XMLSerializable
Overrides:
importXML in class SnailMailAddress
Throws:
SAXException
IOException
See Also:
XMLSerializable.exportXML(OutputStream)

setAllFrom

public void setAllFrom(SnailMailAddress adr)
Description copied from interface: Forgeable
copies the properties of the given object and applies them to this instance, so that its behavior in regards to the given object can be matched to the extend that the implementing class supports that behavior.

Specified by:
setAllFrom in interface Forgeable<SnailMailAddress>
Overrides:
setAllFrom in class SnailMailAddress
Parameters:
adr - the object whose behavior is to be copied to this instance

clearAll

public void clearAll()
Description copied from class: SnailMailAddress
allows to clear all fields of this address

Overrides:
clearAll in class SnailMailAddress

setCity

public void setCity(String city)
Overrides:
setCity in class SnailMailAddress

setCountry

public void setCountry(String country)
Description copied from class: SnailMailAddress
uses the ISO 3166 2-letter code

Overrides:
setCountry in class SnailMailAddress

setFullAddress

public String setFullAddress(String fullAddress,
                             Locale l)
Description copied from class: SnailMailAddress
a non-null parameter is used to override how the address is constructed

Overrides:
setFullAddress in class SnailMailAddress
Returns:
the fullAddress previously set for the given Locale
See Also:
SnailMailAddress.getAddressString(Locale)

setFullAddress

public String setFullAddress(String fullAddress)
Description copied from class: SnailMailAddress
sets the address for the current Locale

Overrides:
setFullAddress in class SnailMailAddress

setState

public void setState(String state)
Overrides:
setState in class SnailMailAddress

setStreet

public void setStreet(String street)
Description copied from class: SnailMailAddress
may contain multiple lines

Overrides:
setStreet in class SnailMailAddress

setStreetNumber

public void setStreetNumber(String sn)
Overrides:
setStreetNumber in class SnailMailAddress

setTitle

public void setTitle(String title)
Description copied from class: SnailMailAddress
may contain multiple lines

Overrides:
setTitle in class SnailMailAddress

setZip

public void setZip(String zip)
Overrides:
setZip in class SnailMailAddress


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads