net.moraleboost.junsai
クラス Token

java.lang.Object
  上位を拡張 net.moraleboost.junsai.Token

public class Token
extends java.lang.Object

辞書エントリを表す。辞書見出し一つに対し、一つのTokenが対応する。

作成者:
taketa

フィールドの概要
 int compound
           
 int feature
           
 int lcAttr
           
 int posid
           
 int rcAttr
           
static int SIZE
           
 short wcost
           
 
コンストラクタの概要
Token()
           
 
メソッドの概要
static int getSize(int num)
          num個分のTokenの占めるバイト数を算出する。
 void read(java.nio.ByteBuffer buf)
          バッファから、Tokenのデータを読み込む。
 void write(java.nio.ByteBuffer buf)
          バッファに、Tokenのデータを書き込む。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

SIZE

public static final int SIZE
関連項目:
定数フィールド値

lcAttr

public int lcAttr

rcAttr

public int rcAttr

posid

public int posid

wcost

public short wcost

feature

public int feature

compound

public int compound
コンストラクタの詳細

Token

public Token()
メソッドの詳細

read

public void read(java.nio.ByteBuffer buf)
バッファから、Tokenのデータを読み込む。 bufは、あらかじめTokenデータの位置にシークしてある必要がある。

パラメータ:
buf - バッファ

write

public void write(java.nio.ByteBuffer buf)
バッファに、Tokenのデータを書き込む。 bufは、あらかじめTokenを書きこむ位置にシークしてある必要がある。

パラメータ:
buf - バッファ

getSize

public static int getSize(int num)
num個分のTokenの占めるバイト数を算出する。

パラメータ:
num - Token数
戻り値:
Tokeの占めるバイト数。