net.wimpi.pim.contact.basicimpl
Class AddressImpl

java.lang.Object
  |
  +--net.wimpi.pim.util.AbstractIdentifiable
        |
        +--net.wimpi.pim.contact.basicimpl.AddressImpl
All Implemented Interfaces:
Address, Identifiable, java.io.Serializable

public class AddressImpl
extends AbstractIdentifiable
implements Address

A basic and simple implementation of an Address.

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger
See Also:
Serialized Form

Field Summary
protected  java.lang.String m_City
           
protected  java.lang.String m_Country
           
protected  boolean m_Domestic
           
protected  java.lang.String m_Extended
           
protected  boolean m_Home
           
protected  int m_Index
           
protected  boolean m_International
           
protected  java.lang.String m_Label
           
protected  boolean m_Parcel
           
protected  boolean m_Postal
           
protected  java.lang.String m_PostalCode
           
protected  java.lang.String m_PostBox
           
protected  java.lang.String m_Region
           
protected  java.lang.String m_Street
           
protected  boolean m_Work
           
 
Fields inherited from interface net.wimpi.pim.contact.model.Address
TYPE_DOMESTIC, TYPE_HOME, TYPE_INTERNATIONAL, TYPE_PARCEL, TYPE_POSTAL, TYPE_WORK
 
Constructor Summary
AddressImpl()
           
 
Method Summary
 java.lang.String getCity()
          Returns the city of this Address.
 java.lang.String getCountry()
          Returns the country of this Address.
 java.lang.String getExtended()
          Returns the extended part of this Address.
 int getIndex()
           
 java.lang.String getLabel()
          Returns the label of this Address.
 java.lang.String getPostalCode()
          Returns the postal code of this Address.
 java.lang.String getPostBox()
          Returns the post office box of this Address.
 java.lang.String getRegion()
          Returns the region of this Address.
 java.lang.String getStreet()
          Returns the street of this Address.
 boolean isDomestic()
          Tests if this Address is a domestic delivery address.
 boolean isHome()
          Tests if this Address represents a residence.
 boolean isInternational()
          Tests if this Address is international delivery address.
 boolean isParcel()
          Tests if this Address is a parcel delivery address.
 boolean isPostal()
          Tests if this Address is a postal delivery address.
 boolean isType(int TYPE)
          Tests if this Address is of a specific type.
 boolean isWork()
          Tests if this Address represents a place of work.
 void setCity(java.lang.String city)
          Sets the city of this Address.
 void setCountry(java.lang.String country)
          Sets the country of this Address.
 void setDomestic(boolean b)
          Sets or resets the domestic flag of this Address.
 void setExtended(java.lang.String extended)
          Sets the extended part of this Address.
 void setHome(boolean b)
          Sets or resets the home flag of this Address.
 void setIndex(int index)
           
 void setInternational(boolean b)
          Sets or resets the international flag of this Address.
 void setLabel(java.lang.String label)
          Sets the label of this Address.
 void setParcel(boolean b)
          Sets or resets the parcel flag of this Address.
 void setPostal(boolean b)
          Sets or resets the postal flag of this Address.
 void setPostalCode(java.lang.String postalcode)
          Sets the postal code of this Address.
 void setPostBox(java.lang.String pobox)
          Sets the post office box of this Address.
 void setRegion(java.lang.String region)
          Sets the region of this Address.
 void setStreet(java.lang.String street)
          Sets the street of this Address.
 void setWork(boolean b)
          Sets or resets the work flag of this Address.
 
Methods inherited from class net.wimpi.pim.util.AbstractIdentifiable
equals, getUID, setUID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.wimpi.pim.util.Identifiable
getUID
 

Field Detail

m_PostBox

protected java.lang.String m_PostBox

m_Extended

protected java.lang.String m_Extended

m_Street

protected java.lang.String m_Street

m_City

protected java.lang.String m_City

m_Region

protected java.lang.String m_Region

m_PostalCode

protected java.lang.String m_PostalCode

m_Country

protected java.lang.String m_Country

m_Label

protected java.lang.String m_Label

m_Domestic

protected boolean m_Domestic

m_International

protected boolean m_International

m_Work

protected boolean m_Work

m_Home

protected boolean m_Home

m_Postal

protected boolean m_Postal

m_Parcel

protected boolean m_Parcel

m_Index

protected int m_Index
Constructor Detail

AddressImpl

public AddressImpl()
Method Detail

getIndex

public int getIndex()

setIndex

public void setIndex(int index)

getPostBox

public java.lang.String getPostBox()
Description copied from interface: Address
Returns the post office box of this Address.

Specified by:
getPostBox in interface Address
Returns:
the post office box as String.

setPostBox

public void setPostBox(java.lang.String pobox)
Description copied from interface: Address
Sets the post office box of this Address.

Specified by:
setPostBox in interface Address
Parameters:
pobox - the post office box as String.

getExtended

public java.lang.String getExtended()
Description copied from interface: Address
Returns the extended part of this Address.

Specified by:
getExtended in interface Address
Returns:
the extended part as String.

setExtended

public void setExtended(java.lang.String extended)
Description copied from interface: Address
Sets the extended part of this Address.

Specified by:
setExtended in interface Address
Parameters:
extended - the extended part as String.

getStreet

public java.lang.String getStreet()
Description copied from interface: Address
Returns the street of this Address.

Specified by:
getStreet in interface Address
Returns:
the street as String.

setStreet

public void setStreet(java.lang.String street)
Description copied from interface: Address
Sets the street of this Address.

Specified by:
setStreet in interface Address
Parameters:
street - the street as String.

getCity

public java.lang.String getCity()
Description copied from interface: Address
Returns the city of this Address.

Specified by:
getCity in interface Address
Returns:
the city as String.

setCity

public void setCity(java.lang.String city)
Description copied from interface: Address
Sets the city of this Address.

Specified by:
setCity in interface Address
Parameters:
city - the city as String.

getRegion

public java.lang.String getRegion()
Description copied from interface: Address
Returns the region of this Address.

Specified by:
getRegion in interface Address
Returns:
the region as String.

setRegion

public void setRegion(java.lang.String region)
Description copied from interface: Address
Sets the region of this Address.

Specified by:
setRegion in interface Address
Parameters:
region - the region as String.

getPostalCode

public java.lang.String getPostalCode()
Description copied from interface: Address
Returns the postal code of this Address.

Specified by:
getPostalCode in interface Address
Returns:
the postal code as String.

setPostalCode

public void setPostalCode(java.lang.String postalcode)
Description copied from interface: Address
Sets the postal code of this Address.

Specified by:
setPostalCode in interface Address
Parameters:
postalcode - the postal code as String.

getCountry

public java.lang.String getCountry()
Description copied from interface: Address
Returns the country of this Address.

Specified by:
getCountry in interface Address
Returns:
the country as String.

setCountry

public void setCountry(java.lang.String country)
Description copied from interface: Address
Sets the country of this Address.

Specified by:
setCountry in interface Address
Parameters:
country - as String.

getLabel

public java.lang.String getLabel()
Description copied from interface: Address
Returns the label of this Address. The label refers to a formatted text representation of this Address.

Specified by:
getLabel in interface Address
Returns:
the label as String.

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: Address
Sets the label of this Address.

Specified by:
setLabel in interface Address
Parameters:
label - the label as String.

isDomestic

public boolean isDomestic()
Description copied from interface: Address
Tests if this Address is a domestic delivery address.

Specified by:
isDomestic in interface Address
Returns:
true if for domestic delivery, false otherwise.

isInternational

public boolean isInternational()
Description copied from interface: Address
Tests if this Address is international delivery address.

Specified by:
isInternational in interface Address
Returns:
true if for international delivery, false otherwise.

setDomestic

public void setDomestic(boolean b)
Description copied from interface: Address
Sets or resets the domestic flag of this Address.

Specified by:
setDomestic in interface Address
Parameters:
b - true if for domestic delivery, false otherwise.

setInternational

public void setInternational(boolean b)
Description copied from interface: Address
Sets or resets the international flag of this Address.

Specified by:
setInternational in interface Address
Parameters:
b - true if for international delivery, false otherwise.

isParcel

public boolean isParcel()
Description copied from interface: Address
Tests if this Address is a parcel delivery address.

Specified by:
isParcel in interface Address
Returns:
true if for parcel delivery, false otherwise.

setParcel

public void setParcel(boolean b)
Description copied from interface: Address
Sets or resets the parcel flag of this Address.

Specified by:
setParcel in interface Address
Parameters:
b - true if for parcel delivery, false otherwise.

isPostal

public boolean isPostal()
Description copied from interface: Address
Tests if this Address is a postal delivery address.

Specified by:
isPostal in interface Address
Returns:
true if for postal delivery, false otherwise.

setPostal

public void setPostal(boolean b)
Description copied from interface: Address
Sets or resets the postal flag of this Address.

Specified by:
setPostal in interface Address
Parameters:
b - true if for postal delivery, false otherwise.

isHome

public boolean isHome()
Description copied from interface: Address
Tests if this Address represents a residence.

Specified by:
isHome in interface Address
Returns:
true if representing a residence, false otherwise.

isWork

public boolean isWork()
Description copied from interface: Address
Tests if this Address represents a place of work.

Specified by:
isWork in interface Address
Returns:
true if representing a place of work, false otherwise.

setHome

public void setHome(boolean b)
Description copied from interface: Address
Sets or resets the home flag of this Address.

Specified by:
setHome in interface Address
Parameters:
b - true if representing a residence, false otherwise.

setWork

public void setWork(boolean b)
Description copied from interface: Address
Sets or resets the work flag of this Address.

Specified by:
setWork in interface Address
Parameters:
b - true if representing a place of work, false otherwise.

isType

public boolean isType(int TYPE)
Description copied from interface: Address
Tests if this Address is of a specific type. Types are defined as constants of this interface.

Specified by:
isType in interface Address
Parameters:
TYPE - a type as int.


Copyright © 2001-2003 jpim team.