- java.lang.Object
-
- net.sourceforge.urin.Hexadectet
-
public final class Hexadectet extends java.lang.ObjectAn 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 HexadectetZEROAHexadectetrepresenting 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)inthashCode()static Hexadectethexadectet(int hexadectet)Factory method for creatingHexadectets.java.lang.StringtoString()
-
-
-
Field Detail
-
ZERO
public static final Hexadectet ZERO
AHexadectetrepresenting 0.
-
-
Method Detail
-
hexadectet
public static Hexadectet hexadectet(int hexadectet)
Factory method for creatingHexadectets.- Parameters:
hexadectet- anintin the range 0 to FFFF (0 to 65535 in decimal).- Returns:
- a
Hexadectetrepresenting the givenint. - Throws:
java.lang.IllegalArgumentException- if the givenintis outside the range 0 to FFFF.
-
toString
public java.lang.String toString()
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-