All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class VisiModel.IPAddress

java.lang.Object
   |
   +----VisiModel.NodeAddress
           |
           +----VisiModel.IPAddress

public class IPAddress
extends NodeAddress
Class definition for an IP address.


Variable Index

 o address
 o unknown

Constructor Index

 o IPAddress(String)
Class constructor.

Method Index

 o equals(Object)
Compares the IP address against the specified object.
 o getAddress()
Get the raw IP addresss.
 o getHostAddress()
Return IP address string as %d.%d.%d.%d
 o hashCode()
Get a hashcode for the IP address.
 o isUnknown()
Determines whether the address is an unknown address.
 o toString()
Get a string describing the IPAddress object.

Variables

 o unknown
 private static InetAddress unknown
 o address
 private InetAddress address

Constructors

 o IPAddress
 public IPAddress(String addr) throws UnknownHostException
Class constructor.

Parameters:
addr - The node's host name or address in dotted-decimal format.

Methods

 o getAddress
 public byte[] getAddress()
Get the raw IP addresss.

Returns:
A byte array containing the raw IP address.
 o isUnknown
 public boolean isUnknown()
Determines whether the address is an unknown address.

Returns:
true is the address is an unknown address
Overrides:
isUnknown in class NodeAddress
 o hashCode
 public int hashCode()
Get a hashcode for the IP address.

Returns:
An integer hash code.
Overrides:
hashCode in class Object
 o equals
 public boolean equals(Object obj)
Compares the IP address against the specified object.

Returns:
True if the addresses have the same length and the same value; false otherwise.
Overrides:
equals in class Object
 o toString
 public String toString()
Get a string describing the IPAddress object.

Returns:
A string describing the IPAddress object.
Overrides:
toString in class Object
 o getHostAddress
 public String getHostAddress()
Return IP address string as %d.%d.%d.%d

Overrides:
getHostAddress in class NodeAddress

All Packages  Class Hierarchy  This Package  Previous  Next  Index