jp.terasoluna.fw.ex.unit.io.impl
クラス CollectionTarget<T>

java.lang.Object
  上位を拡張 jp.terasoluna.fw.ex.unit.io.impl.CollectionTarget<T>
すべての実装されたインタフェース:
OutputTarget<T>

public class CollectionTarget<T>
extends Object
implements OutputTarget<T>

Collectionへの出力ターゲットを作成します。

 任意の入力ソースのデータを任意のCollectionに保存することができます。
 


フィールドの概要
protected  Collection<T> collection
           
 
コンストラクタの概要
CollectionTarget(Collection<T> collection)
          コンストラクタ
 
メソッドの概要
 void close()
          出力終了処理を行います。
 void write(T obj)
          一行あたりのオブジェクトを書き込みます。
 void writeHeader(String[] header)
          ヘッダ情報を書き込みます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

collection

protected final Collection<T> collection
コンストラクタの詳細

CollectionTarget

public CollectionTarget(Collection<T> collection)
コンストラクタ

パラメータ:
collection - 出力先となるコレクション
メソッドの詳細

writeHeader

public void writeHeader(String[] header)
インタフェース OutputTarget の記述:
ヘッダ情報を書き込みます。

定義:
インタフェース OutputTarget<T> 内の writeHeader
パラメータ:
header - ヘッダ情報

write

public void write(T obj)
インタフェース OutputTarget の記述:
一行あたりのオブジェクトを書き込みます。

定義:
インタフェース OutputTarget<T> 内の write
パラメータ:
obj - 書き込むオブジェクト

close

public void close()
インタフェース OutputTarget の記述:
出力終了処理を行います。

定義:
インタフェース OutputTarget<T> 内の close


Copyright © 2011. All Rights Reserved.