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
Constructor Summary |
GetCode(java.util.Vector byteVector,
java.io.FileInputStream fstreamIn,
IntWrapper symbol)
Constructor |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_symbol
IntWrapper _symbol
_byteVector
java.util.Vector _byteVector
_fstreamIn
java.io.FileInputStream _fstreamIn
GetCode
public GetCode(java.util.Vector byteVector,
java.io.FileInputStream fstreamIn,
IntWrapper symbol)
- Constructor
- Parameters:
Vector
- FileInputStream
- IntWrapper
-
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