Skip to content

Commit a556301

Browse files
committed
TableIOOptions: Parser of type Function<String, ?> instead of Function<String, Object>
1 parent 947fe26 commit a556301

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/scijava/table/io/ColumnTableIOOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ColumnTableIOOptions formatter(Function<Object, String> formatter) {
4747
return setValue(formatterKey, formatter);
4848
}
4949

50-
ColumnTableIOOptions parser(Function<String, Object> parser) {
50+
ColumnTableIOOptions parser(Function<String, ?> parser) {
5151
return setValue(parserKey, parser);
5252
}
5353

@@ -57,7 +57,7 @@ public Function<Object, String> formatter() {
5757
return getValueOrDefault(formatterKey, String::valueOf);
5858
}
5959

60-
public Function<String, Object> parser() {
60+
public Function<String, ?> parser() {
6161
return getValueOrDefault(parserKey, String::valueOf);
6262
}
6363
}

src/main/java/org/scijava/table/io/TableIOOptions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public TableIOOptions guessParser(boolean guessParser) {
135135
/**
136136
* @param parser Parser to use when converting table entries into data objects.
137137
*/
138-
public TableIOOptions parser(Function<String, Object> parser) {
138+
public TableIOOptions parser(Function<String, ?> parser) {
139139
guessParser(false);
140140
return setValue(parserKey, parser);
141141
}
@@ -188,7 +188,7 @@ public TableIOOptions columnFormatter(int column, Function<Object, String> forma
188188
return this;
189189
}
190190

191-
private Function<String, Object> getParser(Class<?> type) {
191+
private Function<String, ?> getParser(Class<?> type) {
192192
if(type.equals(String.class)) return String::valueOf;
193193
if(type.equals(Double.class)) return Double::valueOf;
194194
if(type.equals(Float.class)) return Float::valueOf;
@@ -266,7 +266,7 @@ public boolean guessParser() {
266266
/**
267267
* @return Parser to use when converting table entries into data objects.
268268
*/
269-
public Function<String, Object> parser() {
269+
public Function<String, ?> parser() {
270270
return getValueOrDefault(parserKey, String::valueOf);
271271
}
272272

0 commit comments

Comments
 (0)