net.trialpc.sticktools.model
クラス SentenceWrappedDocument<T extends SentenceModel>

java.lang.Object
  上位を拡張 net.trialpc.sticktools.model.AbstractLangModel
      上位を拡張 net.trialpc.sticktools.model.WrapModel<T>
          上位を拡張 net.trialpc.sticktools.model.WrapDocument<T>
              上位を拡張 net.trialpc.sticktools.model.SentenceWrappedDocument<T>
型パラメータ:
T - 文モデル
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Comparable<DocumentModel>, java.lang.Iterable<T>, java.util.EventListener, DocumentModel, LangModel, StateChangeListener, StateChangeObservable
直系の既知のサブクラス:
LocalContextDocument

public class SentenceWrappedDocument<T extends SentenceModel>
extends WrapDocument<T>

文モデルを基に構成された文書モデルを示すクラスです。

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

フィールドの概要
 
クラス net.trialpc.sticktools.model.WrapModel から継承されたフィールド
listeners
 
コンストラクタの概要
SentenceWrappedDocument(java.lang.String id)
          文 ID を指定して SentenceWrappedDocument クラスのインスタンスを生成します。
 
メソッドの概要
 boolean addSentence(T sentence)
          ラッピングする文モデルを追加します。
 void addSentenceAll(java.util.Collection<T> c)
          コレクションに含まれる文モデルを追加します。
 boolean containsSentence(T d)
          指定した文モデルが含まれているかどうかを返します。
 T getSentence(java.lang.String id)
          指定された文 ID を持つ文モデルを返します。
 
クラス net.trialpc.sticktools.model.WrapDocument から継承されたメソッド
compareTo, getChildrenModels, getDocumentId, iterator
 
クラス net.trialpc.sticktools.model.WrapModel から継承されたメソッド
addChildModel, addChildModelAll, addListener, castCollection, equals, getVocabulary, hashCode, isModifiable, numOfTerms, stateChanged, termCount
 
クラス net.trialpc.sticktools.model.AbstractLangModel から継承されたメソッド
containsTerm, containsTerms, contaisQueries, numOfVocabulary, termFrequency, toString
 
クラス 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
 

コンストラクタの詳細

SentenceWrappedDocument

public SentenceWrappedDocument(java.lang.String id)
文 ID を指定して SentenceWrappedDocument クラスのインスタンスを生成します。

パラメータ:
id - 文 ID
例外:
java.lang.NullPointerException - idnull である場合
メソッドの詳細

addSentence

public boolean addSentence(T sentence)
ラッピングする文モデルを追加します。

パラメータ:
sentence - 文モデルのインスタンス
戻り値:
追加できたときは true、できなかったときは false

addSentenceAll

public void addSentenceAll(java.util.Collection<T> c)
コレクションに含まれる文モデルを追加します。

パラメータ:
c - 文モデルを含むコレクション
例外:
java.lang.NullPointerException - cnull である場合

getSentence

public T getSentence(java.lang.String id)
指定された文 ID を持つ文モデルを返します。 指定された文 ID が存在しない場合は、null を返します。

パラメータ:
id - 文 ID
戻り値:
指定した文 ID を持つ文モデル

containsSentence

public boolean containsSentence(T d)
指定した文モデルが含まれているかどうかを返します。

パラメータ:
d - 文モデルインスタンス
戻り値:
含まれていれば true、含まれていなければ false