1 /*
2 * Copyright 2013 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package com.orangesignal.csv.manager;
18
19 import java.util.List;
20
21 import com.orangesignal.csv.CsvConfig;
22
23 /**
24 * 区切り文字形式データの統合アクセスインタフェースです。
25 *
26 * @author Koji Sugisawa
27 */
28 public interface CsvManager {
29
30 /**
31 * 区切り文字形式情報を設定します。
32 *
33 * @param cfg 区切り文字形式情報
34 * @return このオブジェクトへの参照
35 * @throws IllegalArgumentException {@code cfg} が {@code null} の場合
36 */
37 CsvManager config(CsvConfig cfg);
38
39 /**
40 * 区切り文字形式データ統合入力インタフェースを構築して返します。
41 *
42 * @param type 区切り文字形式データの型
43 * @return 区切り文字形式データの統合入力インタフェース
44 * @throws IllegalArgumentException {@code type} が {@code null} または不正な場合
45 */
46 <T> CsvLoader<T> load(Class<T> type);
47
48 /**
49 * 区切り文字形式データ統合出力インタフェースを構築して返します。
50 *
51 * @param list 区切り文字形式データのリスト
52 * @param type 区切り文字形式データの型
53 * @return 区切り文字形式データの統合出力インタフェース
54 * @throws IllegalArgumentException {@code list} または {@code type} が {@code null} または不正な場合
55 */
56 <T> CsvSaver<T> save(List<T> list, Class<T> type);
57
58 }