net.trialpc.sticktools.model
クラス BaseDocument

java.lang.Object
  上位を拡張 net.trialpc.sticktools.model.AbstractLangModel
      上位を拡張 net.trialpc.sticktools.model.BaseModel
          上位を拡張 net.trialpc.sticktools.model.BaseDocument
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Comparable<DocumentModel>, DocumentModel, LangModel, StateChangeObservable

public class BaseDocument
extends BaseModel
implements DocumentModel, StateChangeObservable, java.lang.Comparable<DocumentModel>, java.io.Serializable

基本となる文書モデルのクラスです。 このクラスの自然順序付けは、文書 ID について昇順です。

作成者:
tetsu
関連項目:
DocCollection, DocumentModel, 直列化された形式

フィールドの概要
 
クラス net.trialpc.sticktools.model.BaseModel から継承されたフィールド
listeners
 
コンストラクタの概要
BaseDocument(java.lang.String id)
          文書 ID を指定して BaseDocument インスタンスを生成します。
 
メソッドの概要
 int compareTo(DocumentModel arg0)
           
 boolean equals(java.lang.Object o)
          言語モデルが同一であるかを返します。
 java.lang.String getDocumentId()
          文書 ID を返します。
 int hashCode()
          ハッシュコードを返します。
static BaseDocument unmodifiableDocument(BaseDocument d)
          変更不可能な BaseDocument インスタンスを返します。
 
クラス net.trialpc.sticktools.model.BaseModel から継承されたメソッド
addListener, addTerm, addTerms, castCollection, castMap, getTerms, getVocabulary, isEmpty, notify, numOfTerms, numOfVocabulary, setTerms, termCount, toString
 
クラス net.trialpc.sticktools.model.AbstractLangModel から継承されたメソッド
containsTerm, containsTerms, contaisQueries, isModifiable, termFrequency
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
インタフェース net.trialpc.sticktools.model.LangModel から継承されたメソッド
containsTerm, containsTerms, getVocabulary, isModifiable, numOfTerms, numOfVocabulary, termCount, termFrequency
 
インタフェース net.trialpc.sticktools.model.StateChangeObservable から継承されたメソッド
addListener
 

コンストラクタの詳細

BaseDocument

public BaseDocument(java.lang.String id)
文書 ID を指定して BaseDocument インスタンスを生成します。 null が与えられた場合は、空文字が文書 ID になります。

パラメータ:
id - 文書 ID
メソッドの詳細

getDocumentId

public java.lang.String getDocumentId()
インタフェース DocumentModel の記述:
文書 ID を返します。 文書 ID が設定されていない場合は、空文字か代替文字が返されます。

定義:
インタフェース DocumentModel 内の getDocumentId
戻り値:
文書 ID

unmodifiableDocument

public static BaseDocument unmodifiableDocument(BaseDocument d)

変更不可能な BaseDocument インスタンスを返します。 返されるインスタンスは、引数 d と同じ文書 ID を持ちます。

コピー元の BaseDocument インスタンスの内容はコピーされます(シャローコピー)。 そのため、コピー元のインスタンスの内容を変更しても、コピー先には反映されません。

パラメータ:
d - 変更不可能な文書モデルの元になるインスタンス
戻り値:
変更不可能な BaseDocument インスタンス
例外:
java.lang.NullPointerException - d が null である場合

hashCode

public int hashCode()
クラス BaseModel の記述:
ハッシュコードを返します。

オーバーライド:
クラス BaseModel 内の hashCode
戻り値:
ハッシュコード

equals

public boolean equals(java.lang.Object o)
クラス BaseModel の記述:
言語モデルが同一であるかを返します。

オーバーライド:
クラス BaseModel 内の equals
パラメータ:
o - 比較対象のインスタンス
戻り値:
同一の言語モデルであれば true

compareTo

public int compareTo(DocumentModel arg0)
定義:
インタフェース java.lang.Comparable<DocumentModel> 内の compareTo