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 から継承されたメソッド |
addChildModel, addChildModelAll, addListener, castCollection, equals, getVocabulary, hashCode, isModifiable, numOfTerms, stateChanged, termCount |
クラス java.lang.Object から継承されたメソッド |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SentenceWrappedDocument
public SentenceWrappedDocument(java.lang.String id)
- 文 ID を指定して
SentenceWrappedDocument
クラスのインスタンスを生成します。
- パラメータ:
id
- 文 ID
- 例外:
java.lang.NullPointerException
- id
が null
である場合
addSentence
public boolean addSentence(T sentence)
- ラッピングする文モデルを追加します。
- パラメータ:
sentence
- 文モデルのインスタンス
- 戻り値:
- 追加できたときは
true
、できなかったときは false
addSentenceAll
public void addSentenceAll(java.util.Collection<T> c)
- コレクションに含まれる文モデルを追加します。
- パラメータ:
c
- 文モデルを含むコレクション
- 例外:
java.lang.NullPointerException
- c
が null
である場合
getSentence
public T getSentence(java.lang.String id)
- 指定された文 ID を持つ文モデルを返します。
指定された文 ID が存在しない場合は、
null
を返します。
- パラメータ:
id
- 文 ID
- 戻り値:
- 指定した文 ID を持つ文モデル
containsSentence
public boolean containsSentence(T d)
- 指定した文モデルが含まれているかどうかを返します。
- パラメータ:
d
- 文モデルインスタンス
- 戻り値:
- 含まれていれば
true
、含まれていなければ false