1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.mail;
  6. import java.io.Serializable;
  7. /**
  8. * This abstract class models the addresses in a message.
  9. * Subclasses provide specific implementations. Subclasses
  10. * will typically be serializable so that (for example) the
  11. * use of Address objects in search terms can be serialized
  12. * along with the search terms.
  13. *
  14. * @author John Mani
  15. * @author Bill Shannon
  16. */
  17. public abstract class Address implements Serializable {
  18. /**
  19. * Return a type string that identifies this address type.
  20. *
  21. * @return address type
  22. * @see javax.mail.internet.InternetAddress
  23. */
  24. public abstract String getType();
  25. /**
  26. * Return a String representation of this address object.
  27. *
  28. * @return string representation of this address
  29. */
  30. public abstract String toString();
  31. /**
  32. * The equality operator.
  33. *
  34. * @param address Address object
  35. */
  36. public abstract boolean equals(Object address);
  37. }