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.
-
address
-
-
unknown
-
-
IPAddress(String)
- Class constructor.
-
equals(Object)
- Compares the IP address against the specified object.
-
getAddress()
- Get the raw IP addresss.
-
getHostAddress()
- Return IP address string as %d.%d.%d.%d
-
hashCode()
- Get a hashcode for the IP address.
-
isUnknown()
- Determines whether the address is an unknown address.
-
toString()
- Get a string describing the IPAddress object.
unknown
private static InetAddress unknown
address
private InetAddress address
IPAddress
public IPAddress(String addr) throws UnknownHostException
- Class constructor.
- Parameters:
- addr - The node's host name or address in
dotted-decimal format.
getAddress
public byte[] getAddress()
- Get the raw IP addresss.
- Returns:
- A byte array containing the raw IP address.
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
hashCode
public int hashCode()
- Get a hashcode for the IP address.
- Returns:
- An integer hash code.
- Overrides:
- hashCode in class Object
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
toString
public String toString()
- Get a string describing the IPAddress object.
- Returns:
- A string describing the IPAddress object.
- Overrides:
- toString in class Object
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