- java.lang.Object
-
- net.sourceforge.urin.Octet
-
public final class Octet extends java.lang.Object
An integer in the range 0 to 255. Immutable and thread safe.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
int
hashCode()
static Octet
octet(int octet)
Factory method for creatingOctet
s.java.lang.String
toString()
-
-
-
Method Detail
-
octet
public static Octet octet(int octet)
Factory method for creatingOctet
s.- Parameters:
octet
- anint
in the range 0 to 255.- Returns:
- an
Octet
representing the givenint
. - Throws:
java.lang.IllegalArgumentException
- if the givenint
is outside the range 0 to 255.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-