- java.lang.Object
-
- net.sourceforge.urin.Hexadectet
-
public final class Hexadectet extends java.lang.Object
An integer in the range 0 to FFFF (0 to 65535 in decimal). Immutable and thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description static Hexadectet
ZERO
AHexadectet
representing 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
int
hashCode()
static Hexadectet
hexadectet(int hexadectet)
Factory method for creatingHexadectets
.java.lang.String
toString()
-
-
-
Field Detail
-
ZERO
public static final Hexadectet ZERO
AHexadectet
representing 0.
-
-
Method Detail
-
hexadectet
public static Hexadectet hexadectet(int hexadectet)
Factory method for creatingHexadectets
.- Parameters:
hexadectet
- anint
in the range 0 to FFFF (0 to 65535 in decimal).- Returns:
- a
Hexadectet
representing the givenint
. - Throws:
java.lang.IllegalArgumentException
- if the givenint
is outside the range 0 to FFFF.
-
toString
public java.lang.String toString()
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-