All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class network.Address

java.lang.Object
   |
   +----network.Address

public class Address
extends Object
A generic address. Addresses identify clients of the network. Generic addresses may be compared for equality. Real network implementations will likely have to extend this to model more interesting addressing schemes.


Constructor Index

 o Address(String)
Make a new address from a string.

Method Index

 o equals(Address)
Compare two addresses
 o toString()
Convert the address to a string

Constructors

 o Address
 public Address(String s)
Make a new address from a string.

Methods

 o toString
 public String toString()
Convert the address to a string

Returns:
the string name the address was constructed with
Overrides:
toString in class Object
 o equals
 public boolean equals(Address rhs)
Compare two addresses

Returns:
true if the addresses represent the same client (in this case string equality).

All Packages  Class Hierarchy  This Package  Previous  Next  Index