biTree.visitor
Class GetCode

java.lang.Object
  |
  +--biTree.visitor.GetCode
All Implemented Interfaces:
Visitor

public class GetCode
extends java.lang.Object
implements Visitor

A visitor on WeightCompares that gets a value for a given code by traversing the tree.

Author:
Richa Dubey

Field Summary
(package private)  java.util.Vector _byteVector
           
(package private)  java.io.FileInputStream _fstreamIn
           
(package private)  IntWrapper _symbol
           
 
Constructor Summary
GetCode(java.util.Vector byteVector, java.io.FileInputStream fstreamIn, IntWrapper symbol)
          Constructor
 
Method Summary
 void biTree(BiTree wc)
          The method to call on biTrees.
 void symbol(Symbol wc)
          The method for Symbols.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_symbol

IntWrapper _symbol

_byteVector

java.util.Vector _byteVector

_fstreamIn

java.io.FileInputStream _fstreamIn
Constructor Detail

GetCode

public GetCode(java.util.Vector byteVector,
               java.io.FileInputStream fstreamIn,
               IntWrapper symbol)
Constructor
Parameters:
Vector -  
FileInputStream -  
IntWrapper -  
Method Detail

biTree

public void biTree(BiTree wc)
The method to call on biTrees. Searches down through the binary tree.
Specified by:
biTree in interface Visitor
Parameters:
BiTree - host

symbol

public void symbol(Symbol wc)
The method for Symbols. Just returns the value, because we're at the end of our search- we've found the letter represented by our sequence of bits
Specified by:
symbol in interface Visitor
Parameters:
Symbol - host