compress
Class VecToTree

java.lang.Object
  |
  +--compress.VecToTree

public class VecToTree
extends java.lang.Object

This class is a behavior class. It has a method to convert a vector of WeightCompares into a binary tree.

Author:
Chad Cook

Field Summary
static VecToTree Singleton
          Singleton pattern
 
Constructor Summary
VecToTree()
           
 
Method Summary
(package private)  BiTree execute(java.util.Vector codeVector)
          Converts the given vector of WeightCompares into a binary tree of WeightCompares
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

Singleton

public static final VecToTree Singleton
Singleton pattern
Constructor Detail

VecToTree

public VecToTree()
Method Detail

execute

BiTree execute(java.util.Vector codeVector)
Converts the given vector of WeightCompares into a binary tree of WeightCompares
Parameters:
Vector - The vector of WeightCompares to be converted
Returns:
The Huffman tree from the given letters and frequencies.