Compoze Software, Inc.

com.compoze.contact
Class MailingAddress

java.lang.Object
  |
  +--com.compoze.contact.MailingAddress
All Implemented Interfaces:
java.io.Serializable

public class MailingAddress
extends java.lang.Object
implements java.io.Serializable

This class represents a contact mailing address. A mailing address designates which address is the contact primary address for mail.

See Also:
Contact.setMailingAddress(MailingAddress), Contact.getMailingAddress(), Serialized Form

Field Summary
static MailingAddress BUSINESS
          This value represents a value of 'business address'.
static MailingAddress HOME
          This value represents a value of 'home address'.
static MailingAddress OTHER
          This value represents a value of 'other address'.
static java.util.List s_values
          An array containing all of the fixed mailing values.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks for equality.
static MailingAddress get(int iStoreValue)
          Gets the mailing address by its store value.
static MailingAddress get(java.lang.String sName)
          Gets the mailing address by the name in the system default locale.
static java.util.List getList()
          Gets the list of mailing address levels.
 java.lang.String getName()
          Gets the name of the mailing address using the system default locale.
 java.lang.String getName(java.util.Locale locale)
          Gets the name of the mailing address using the specified locale.
 int getStoreValue()
          Gets the value that's used to store the mailing address in the storage system.
 java.lang.String toString()
          Returns a string representation of the object.
 java.lang.String toString(java.util.Locale locale)
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_values

public static java.util.List s_values
An array containing all of the fixed mailing values.

HOME

public static final MailingAddress HOME
This value represents a value of 'home address'.

BUSINESS

public static final MailingAddress BUSINESS
This value represents a value of 'business address'.

OTHER

public static final MailingAddress OTHER
This value represents a value of 'other address'.
Method Detail

getName

public java.lang.String getName()
Gets the name of the mailing address using the system default locale.
Returns:
the name

getName

public java.lang.String getName(java.util.Locale locale)
Gets the name of the mailing address using the specified locale.
Parameters:
locale - the locale
Returns:
the name

getStoreValue

public int getStoreValue()
Gets the value that's used to store the mailing address in the storage system.
Returns:
the store value

get

public static MailingAddress get(int iStoreValue)
Gets the mailing address by its store value.
Parameters:
iStoreValue - the store value to get by
Returns:
the matching mailing address or null if not found

get

public static MailingAddress get(java.lang.String sName)
Gets the mailing address by the name in the system default locale.
Parameters:
sName - the name in the system default locale
Returns:
the matching mailing address or null if not found

getList

public static java.util.List getList()
Gets the list of mailing address levels.
Returns:
the list of MailingAddresss (unmodifiable)

equals

public boolean equals(java.lang.Object o)
Checks for equality. The store value is used to determine equality, so that the language the name is represented in is not important.
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to check (must be an MailingAddress or else a ClassCastException is thrown)
Returns:
true if this object has the same store value as the argument, false otherwise

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

toString

public java.lang.String toString(java.util.Locale locale)
Returns a string representation of the object.
Parameters:
locale - the locale
Returns:
the string representation of the object

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.