de.jarnbjo.util.io
Class HuffmanNode

java.lang.Object
  extended byde.jarnbjo.util.io.HuffmanNode

public final class HuffmanNode
extends java.lang.Object

Representation of a node in a Huffman tree, used to read Huffman compressed codewords from e.g. a Vorbis stream.


Constructor Summary
HuffmanNode()
          creates a new Huffman tree root node
 
Method Summary
 boolean setNewValue(int depth, int value)
          creates a new tree node at the first free location at the given depth, and assigns the value to it
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HuffmanNode

public HuffmanNode()
creates a new Huffman tree root node

Method Detail

setNewValue

public boolean setNewValue(int depth,
                           int value)
creates a new tree node at the first free location at the given depth, and assigns the value to it

Parameters:
depth - the tree depth of the new node (codeword length in bits)
value - the node's new value