Class HPackHuffman.HuffmanCode

  • Enclosing class:
    HPackHuffman

    protected static class HPackHuffman.HuffmanCode
    extends java.lang.Object
    Represents a Huffman code with a value and bit length.
    • Constructor Summary

      Constructors 
      Constructor Description
      HuffmanCode​(int value, int length)
      Creates a new Huffman code.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getLength()
      Returns the code length in bits.
      int getValue()
      Returns the code value.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • HuffmanCode

        public HuffmanCode​(int value,
                           int length)
        Creates a new Huffman code.
        Parameters:
        value - the code value
        length - the code length in bits
    • Method Detail

      • getValue

        public int getValue()
        Returns the code value.
        Returns:
        the code value
      • getLength

        public int getLength()
        Returns the code length in bits.
        Returns:
        the code length in bits
      • equals

        public boolean equals​(java.lang.Object o)
        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