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.Object
This Huffman codec implementation has been derived from Twitter HPack project (https://github.com/twitter/hpack)
-
-
Field Summary
Fields Modifier and Type Field Description private int
bits
private HuffmanNode[]
children
private int
symbol
-
Constructor Summary
Constructors Constructor Description HuffmanNode()
HuffmanNode(int symbol, int bits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBits()
HuffmanNode
getChild(int index)
int
getSymbol()
boolean
hasChild(int index)
boolean
isTerminal()
(package private) void
setChild(int index, HuffmanNode child)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-