LHA Library for Java

jp.gr.java_conf.dangan.util.lha
Interface HashMethod

All Known Implementing Classes:
HashDefault, HashShort

public interface HashMethod

ハッシュ関数を提供するインターフェイス。

コンストラクタの形式は

 HashMethod( byte[] TextBuffer )
 
 パラメータ:
   TextBuffer     - LZSS圧縮を施すデータの入ったバッファ
 
のような形式に則ること。
また、追加の引数をとりたい場合は
 HashMethod( byte[] TextBuffer,
             Object ExtraData1,
             Object ExtraData2 )
 
のような形式を用いる。
なお、コンストラクタの引数チェックは追加の引数がある場合について行えばよい。
 -- revision history --
 $Log: HashMethod.java,v $
 Revision 1.0  2002/08/05 00:00:00  dangan
 add to version cotrol
 [change]
     requiredSize() を hashRequires() に名前変更。
     size() を tableSize() 名前変更。
 [maintanance]
     ソース整備
     タブ廃止
     ライセンス文の修正

 

Version:
$Revision: 1.0 $
Author:
$Author: dangan $

Method Summary
 int hash(int position)
          ハッシュ関数。 コンストラクタで渡された TextBuffer 内の position からのデータパタンの hash値を生成する。
 int hashRequires()
          ハッシュ関数が ハッシュ値を生成するために使用するバイト数を得る。
 int tableSize()
          この HashMethod を使った場合の HashTable のサイズを得る。
 

Method Detail

hash

int hash(int position)
ハッシュ関数。 コンストラクタで渡された TextBuffer 内の position からのデータパタンの hash値を生成する。

Parameters:
position - データパタンの開始位置
Returns:
ハッシュ値

hashRequires

int hashRequires()
ハッシュ関数が ハッシュ値を生成するために使用するバイト数を得る。

Returns:
ハッシュ関数がハッシュ値を 生成するために使用するバイト数

tableSize

int tableSize()
この HashMethod を使った場合の HashTable のサイズを得る。

Returns:
この HashMethod を使った場合の HashTable のサイズ

LHA Library for Java

When you found typographical errors or omissions, Please mail to cqw10305@nifty.com
The company name and product name which are used in this document, it is the trademark or registered trademark of each company generally.
Copyright © 2001-2002 Michel Ishizuka. All Rights Reserved.