Skip to content

Commit 710db71

Browse files
committed
Change method name to do something *with* a Fix function option. (#232)
1 parent 9af73c6 commit 710db71

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

metafix/src/main/java/org/metafacture/metafix/FixMethod.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ public void apply(final Metafix metafix, final Record record, final List<String>
293293
final String field = params.get(0);
294294
final Timestamp timestamp = new Timestamp();
295295

296-
getOption(options, "format", timestamp::setFormat);
297-
getOption(options, "language", timestamp::setLanguage);
298-
getOption(options, "timezone", timestamp::setTimezone);
296+
withOption(options, "format", timestamp::setFormat);
297+
withOption(options, "language", timestamp::setLanguage);
298+
withOption(options, "timezone", timestamp::setTimezone);
299299

300300
record.set(field, new Value(timestamp.process(null)));
301301
}

metafix/src/main/java/org/metafacture/metafix/api/FixFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface FixFunction {
3232

3333
void apply(Metafix metafix, Record record, List<String> params, Map<String, String> options);
3434

35-
default void getOption(final Map<String, String> options, final String key, final Consumer<String> consumer) {
35+
default void withOption(final Map<String, String> options, final String key, final Consumer<String> consumer) {
3636
if (options.containsKey(key)) {
3737
consumer.accept(options.get(key));
3838
}

0 commit comments

Comments
 (0)