Class 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 creating Octets.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • octet

        public static Octet octet​(int octet)
        Factory method for creating Octets.
        Parameters:
        octet - an int in the range 0 to 255.
        Returns:
        an Octet representing the given int.
        Throws:
        java.lang.IllegalArgumentException - if the given int is outside the range 0 to 255.
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object