View Javadoc
1   /*
2    * Copyright 2014 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;
18  
19  import java.io.IOException;
20  import java.util.List;
21  
22  /**
23   * 区切り文字形式データトークンに関しての例外が発生した場合にスローされる例外を提供します。
24   * 
25   * @author Koji Sugisawa
26   * @since 2.1
27   */
28  public class CsvTokenException extends IOException {
29  
30  	private static final long serialVersionUID = 3908133388773744080L;
31  
32  	/**
33  	 * 区切り文字形式データトークンのリストを保持します。
34  	 */
35  	private final List<CsvToken> tokens;
36  
37  	/**
38  	 * 指定された詳細メッセージと区切り文字形式データトークンのリストを持つ {@link CsvTokenException} を構築します。
39  	 * 
40  	 * @param message 詳細メッセージ
41  	 * @param tokens 区切り文字形式データトークンの値リスト
42  	 */
43  	public CsvTokenException(final String message, final List<CsvToken> tokens) {
44  		super(message);
45  		this.tokens = tokens;
46  	}
47  
48  	/**
49  	 * 区切り文字形式データトークンのリストを返します。
50  	 * 
51  	 * @return 区切り文字形式データトークンのリスト
52  	 */
53  	public List<CsvToken> getTokens() {
54  		return tokens;
55  	}
56  
57  }