Package org.apache.hc.core5.http2.hpack
Class HuffmanNode
- java.lang.Object
-
- org.apache.hc.core5.http2.hpack.HuffmanNode
-
final class HuffmanNode extends java.lang.ObjectThis Huffman codec implementation has been derived from Twitter HPack project (https://github.com/twitter/hpack)
-
-
Field Summary
Fields Modifier and Type Field Description private intbitsprivate HuffmanNode[]childrenprivate intsymbol
-
Constructor Summary
Constructors Constructor Description HuffmanNode()HuffmanNode(int symbol, int bits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBits()HuffmanNodegetChild(int index)intgetSymbol()booleanhasChild(int index)booleanisTerminal()(package private) voidsetChild(int index, HuffmanNode child)java.lang.StringtoString()
-
-
-
Field Detail
-
symbol
private final int symbol
-
bits
private final int bits
-
children
private final HuffmanNode[] children
-
-
Method Detail
-
getBits
public int getBits()
-
getSymbol
public int getSymbol()
-
hasChild
public boolean hasChild(int index)
-
getChild
public HuffmanNode getChild(int index)
-
setChild
void setChild(int index, HuffmanNode child)
-
isTerminal
public boolean isTerminal()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-