Class Address

java.lang.Object
  |
  +--java.util.Observable
        |
        +--Address

public class Address
extends Observable

Address for letter to be sorted at the post office.


Constructor Summary
Address(String aZipCode)
          Constructs a new address with the given zip code.
 
Method Summary
 boolean equals(Object other)
          Compares this address to the given object.
static int getCompareCount()
          Returns the compare count of addresses.
 String getZipCode()
          Returns the zip code for this.
 int hashCode()
          Returns the hash code for this.
 boolean isHighlighted()
          Returns whether or not the letter for this should be highlighted.
static void resetCompareCount()
          Resets the compare count of addresses to 0.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Address

public Address(String aZipCode)
Constructs a new address with the given zip code.

Method Detail

equals

public boolean equals(Object other)
Compares this address to the given object.

Overrides:
equals in class Object
Parameters:
other - object to which to compare this

getZipCode

public String getZipCode()
Returns the zip code for this.


isHighlighted

public boolean isHighlighted()
Returns whether or not the letter for this should be highlighted.


hashCode

public int hashCode()
Returns the hash code for this.

Overrides:
hashCode in class Object

getCompareCount

public static int getCompareCount()
Returns the compare count of addresses.


resetCompareCount

public static void resetCompareCount()
Resets the compare count of addresses to 0.