Class HuffmanTree<T>
- java.lang.Object
-
- org.apache.commons.imaging.common.itu_t4.HuffmanTree<T>
-
class HuffmanTree<T> extends java.lang.Object
A Huffman tree implemented as 1 array for high locality of reference.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
HuffmanTree.Node<T>
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<HuffmanTree.Node<T>>
nodes
-
Constructor Summary
Constructors Constructor Description HuffmanTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
decode(BitInputStreamFlexible bitStream)
private HuffmanTree.Node<T>
growAndGetNode(int position)
void
insert(java.lang.String pattern, T value)
-
-
-
Field Detail
-
nodes
private final java.util.List<HuffmanTree.Node<T>> nodes
-
-
Method Detail
-
insert
public final void insert(java.lang.String pattern, T value) throws HuffmanTreeException
- Throws:
HuffmanTreeException
-
growAndGetNode
private HuffmanTree.Node<T> growAndGetNode(int position)
-
decode
public final T decode(BitInputStreamFlexible bitStream) throws HuffmanTreeException
- Throws:
HuffmanTreeException
-
-