Top Description Fields Constructors Methods
com.opencsv.exceptions

public Class CsvChainedException

extends CsvException
Class Inheritance
Imports
java.util.LinkedList, .List

An exception class for collecting multiple exceptions. For internal use only.
Author
Andrew Rucker Jones
Since
5.3

Field Summary

Modifier and TypeField and Description
private final List<CsvFieldAssignmentException>

Constructor Summary

AccessConstructor and Description
public
CsvChainedException(CsvFieldAssignmentException
The first exception for the list being collected. Must not be null.
csve
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
add(CsvFieldAssignmentException
Exception to be added to this chain. Must not be null.
csve
)

Add an exception to the chain of collections.

public List<CsvFieldAssignmentException>
getExceptionChain()

Returns: A list of all exceptions collected

public CsvFieldAssignmentException

Returns:

CsvFieldAssignmentException at the first position in the list, null otherwise.
getFirstException
()

Convenience method to return the first exception from the exception chain.

public boolean

Returns:

true if chain has only a single exception, false otherwise
hasOnlyOneException
()

Convenience method that checks if the chain only has a single exception.

public void
setLine(String[] line)

Overrides com.opencsv.exceptions.CsvException.setLine.

Sets the line for all exceptions collected.

public void
setLineNumber(long lineNumber)

Overrides com.opencsv.exceptions.CsvException.setLineNumber.

Sets the line number for all exceptions collected.

Inherited from com.opencsv.exceptions.CsvException:
getLinegetLineNumber

Field Detail

exceptionChainback to summary
private final List<CsvFieldAssignmentException> exceptionChain

Constructor Detail

CsvChainedExceptionback to summary
public CsvChainedException(CsvFieldAssignmentException csve)

Constructor.

Parameters
csve:CsvFieldAssignmentException

The first exception for the list being collected. Must not be null.

Method Detail

addback to summary
public void add(CsvFieldAssignmentException csve)

Add an exception to the chain of collections.

Parameters
csve:CsvFieldAssignmentException

Exception to be added to this chain. Must not be null.

getExceptionChainback to summary
public List<CsvFieldAssignmentException> getExceptionChain()
Returns:List<CsvFieldAssignmentException>

A list of all exceptions collected

getFirstExceptionback to summary
public CsvFieldAssignmentException getFirstException()

Convenience method to return the first exception from the exception chain.

Returns:CsvFieldAssignmentException

CsvFieldAssignmentException at the first position in the list, null otherwise.

hasOnlyOneExceptionback to summary
public boolean hasOnlyOneException()

Convenience method that checks if the chain only has a single exception.

Returns:boolean

true if chain has only a single exception, false otherwise

setLineback to summary
public void setLine(String[] line)

Overrides com.opencsv.exceptions.CsvException.setLine.

Sets the line for all exceptions collected.

Annotations
@Override
setLineNumberback to summary
public void setLineNumber(long lineNumber)

Overrides com.opencsv.exceptions.CsvException.setLineNumber.

Sets the line number for all exceptions collected.

Annotations
@Override