make CSVStrategy cloneable and serializable: SANDBOX-181

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@477490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-11-21 03:47:02 +00:00
parent ebd9f0e088
commit b73040f2bc

View File

@ -16,12 +16,14 @@
*/
package org.apache.commons.csv;
import java.io.Serializable;
/**
* CSVStrategy
*
* Represents the strategy for a CSV.
*/
public class CSVStrategy {
public class CSVStrategy implements Cloneable, Serializable {
private char delimiter;
private char encapsulator;
@ -88,4 +90,11 @@ public class CSVStrategy {
public void setIgnoreEmptyLines(boolean ignoreEmptyLines) { this.ignoreEmptyLines = ignoreEmptyLines; }
public boolean getIgnoreEmptyLines() { return this.ignoreEmptyLines; }
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e); // impossible
}
}
}