Changed the return type of CSVFormat.clone()
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1201060 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2598862d94
commit
70337bef8f
|
@ -101,7 +101,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withDelimiter(char delimiter) {
|
public CSVFormat withDelimiter(char delimiter) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.delimiter = delimiter;
|
format.delimiter = delimiter;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withEncapsulator(char encapsulator) {
|
public CSVFormat withEncapsulator(char encapsulator) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.encapsulator = encapsulator;
|
format.encapsulator = encapsulator;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withCommentStart(char commentStart) {
|
public CSVFormat withCommentStart(char commentStart) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.commentStart = commentStart;
|
format.commentStart = commentStart;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withEscape(char escape) {
|
public CSVFormat withEscape(char escape) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.escape = escape;
|
format.escape = escape;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withLeadingSpacesIgnored(boolean leadingSpacesIgnored) {
|
public CSVFormat withLeadingSpacesIgnored(boolean leadingSpacesIgnored) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.leadingSpacesIgnored = leadingSpacesIgnored;
|
format.leadingSpacesIgnored = leadingSpacesIgnored;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withTrailingSpacesIgnored(boolean trailingSpacesIgnored) {
|
public CSVFormat withTrailingSpacesIgnored(boolean trailingSpacesIgnored) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.trailingSpacesIgnored = trailingSpacesIgnored;
|
format.trailingSpacesIgnored = trailingSpacesIgnored;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withUnicodeEscapesInterpreted(boolean unicodeEscapesInterpreted) {
|
public CSVFormat withUnicodeEscapesInterpreted(boolean unicodeEscapesInterpreted) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.unicodeEscapesInterpreted = unicodeEscapesInterpreted;
|
format.unicodeEscapesInterpreted = unicodeEscapesInterpreted;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withEmptyLinesIgnored(boolean emptyLinesIgnored) {
|
public CSVFormat withEmptyLinesIgnored(boolean emptyLinesIgnored) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.emptyLinesIgnored = emptyLinesIgnored;
|
format.emptyLinesIgnored = emptyLinesIgnored;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
@ -193,14 +193,14 @@ public class CSVFormat implements Cloneable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSVFormat withLineSeparator(String lineSeparator) {
|
public CSVFormat withLineSeparator(String lineSeparator) {
|
||||||
CSVFormat format = (CSVFormat) clone();
|
CSVFormat format = clone();
|
||||||
format.lineSeparator = lineSeparator;
|
format.lineSeparator = lineSeparator;
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Object clone() {
|
protected CSVFormat clone() {
|
||||||
try {
|
try {
|
||||||
return super.clone();
|
return (CSVFormat) super.clone();
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
throw (Error) new InternalError().initCause(e);
|
throw (Error) new InternalError().initCause(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue