Class AddressCard

java.lang.Object
  |
  +--AddressCard
All Implemented Interfaces:
Comparable

public class AddressCard
extends Object
implements Comparable

AddressCard.java Created: Sun Mar 2 18:30:53 2003

Author:
Stuart C. Shapiro

Constructor Summary
AddressCard(String n, String a)
          Creates a new AddressCard instance.
 
Method Summary
 int compareTo(Object ac)
          Compares this AddressCard to another Object.
 String getAddress()
          Get the value of address.
 String getName()
          Get the value of name.
 void setAddress(String v)
          Set the value of address.
 void setName(String v)
          Set the value of name.
 String toString()
          Returns a String representation of this AddressCard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddressCard

public AddressCard(String n,
                   String a)
Creates a new AddressCard instance.

Parameters:
n - the person whose address card this is.
a - the person's email address.
Method Detail

getName

public String getName()
Get the value of name.

Returns:
value of name.

setName

public void setName(String v)
Set the value of name.

Parameters:
v - Value to assign to name.

getAddress

public String getAddress()
Get the value of address.

Returns:
value of address.

setAddress

public void setAddress(String v)
Set the value of address.

Parameters:
v - Value to assign to address.

compareTo

public int compareTo(Object ac)
Compares this AddressCard to another Object.

Specified by:
compareTo in interface Comparable
Parameters:
ac - an Object value
Returns:
what is returned by String.compareTo for the name of this card as compared to ac.

toString

public String toString()
Returns a String representation of this AddressCard.

Overrides:
toString in class Object
Returns:
a String representation of this AddressCard.