public Date getDate(int pos) throws ThreemaException {
String cell = this.getString(pos); if (cell != null && !cell.isEmpty()) { returnnew Date(Long.parseLong(cell));
}
returnnull;
}
public CSVRow write(String fieldName, Object v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, Object v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public CSVRow write(String fieldName, String v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, String v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public CSVRow write(String fieldName, boolean v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, int v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public CSVRow write(String fieldName, int v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, boolean v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public CSVRow write(String fieldName, Date v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, Date v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public CSVRow write(String fieldName, Object[] v) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position");
}
returnthis.write(pos, v);
}
public CSVRow write(int pos, Object[] v) throws ThreemaException { if (this.data.length < pos) { thrownew ThreemaException("invalid position to write [" + pos + "]");
}
this.data[pos] = this.escape(v); returnthis;
}
public String[] getStrings(int pos) throws ThreemaException {
String r = this.getString(pos); return TestUtil.isEmptyOrNull(r) ? new String[]{} : r.split(";");
}
public String getString(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getString(pos);
}
public @NonNull Integer getInteger(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getInteger(pos);
}
public @NonNull Long getLong(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getLong(pos);
}
publicboolean getBoolean(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getBoolean(pos);
}
public Date getDate(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getDate(pos);
}
public String[] getStrings(String fieldName) throws ThreemaException { int pos = this.getValuePosition(fieldName); if (pos < 0) { thrownew ThreemaException("invalid csv header position [" + fieldName + "]");
} returnthis.getStrings(pos);
}
/** * Return the CSV column index for the specified column name. * * @return the index, or -1 if the column was not found.
*/ publicint getValuePosition(String fieldName) { if (this.header != null && fieldName != null) { for (int n = 0; n < this.header.length; n++) { if (fieldName.equals(this.header[n])) { return n;
}
}
}
/** * return a csv well formed string
*/ private String escape(Date date) { if (date == null) { return"";
} return String.valueOf(date.getTime());
}
/** * return a csv well formed string
*/ private String escape(boolean bool) { return bool ? "1" : "0";
}
/** * return a csv well formed string
*/ private String escape(String ns) { if (ns == null) { return"";
} return ns.replace("\\", "\\\\");
}
private String escape(Object[] os) {
String result = ""; if (os != null) { for (Object o : os) { if (!result.isEmpty()) {
result += ';';
}
result += this.escape(o);
}
}
return result;
}
/** * return a csv well formed string
*/ private String escape(Object ns) { if (ns == null) { return"";
}
returnthis.escape(ns.toString());
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.24Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.