arlut.csd.ganymede
Class IPwrap
java.lang.Object
|
+--arlut.csd.ganymede.IPwrap
- public class IPwrap
- extends java.lang.Object
This is a wrapper class for the Byte array IP value representation
that allows IP addresses to be processed by the Ganymede namespace
hash system.
|
Field Summary |
(package private) java.lang.Byte[] |
address
|
|
Constructor Summary |
IPwrap(java.lang.Byte[] address)
|
|
Method Summary |
boolean |
equals(java.lang.Object value)
Equality test. |
int |
hashCode()
This method generates the hash key for this object for use in
a Hashtable. |
static short |
s2u(byte b)
This method maps a u2s-encoded signed byte value to an
int value between 0 and 255 inclusive. |
static byte |
u2s(int x)
This method maps an int value between 0 and 255 inclusive
to a legal signed byte value. |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, toString, wait, wait, wait |
address
java.lang.Byte[] address
IPwrap
public IPwrap(java.lang.Byte[] address)
u2s
public static final byte u2s(int x)
- This method maps an int value between 0 and 255 inclusive
to a legal signed byte value.
s2u
public static final short s2u(byte b)
- This method maps a u2s-encoded signed byte value to an
int value between 0 and 255 inclusive.
hashCode
public int hashCode()
- This method generates the hash key for this object for use in
a Hashtable.
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object value)
- Equality test. This IPwrap can be compared to either
another IPwrap object or to an array of Bytes.
- Overrides:
equals in class java.lang.Object