Skip to content

Commit

Permalink
added parameterized alternative transform methods
Browse files Browse the repository at this point in the history
  • Loading branch information
douira committed Aug 14, 2022
1 parent 6269dbc commit 896ae3a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,17 @@ public EnumMap<E, String> transform(String a, String b, String c)
return transform(items);
}

public EnumMap<E, String> transform(String a, String b, String c, T parameters)
throws RecognitionException {
return withJobParameters(parameters, () -> transform(a, b, c));
}

public Triple<String> transform(Triple<String> str) throws RecognitionException {
var result = transform(str.a, str.b, str.c);
return new Triple<>(result.get(aType), result.get(bType), result.get(cType));
}

public Triple<String> transform(Triple<String> str, T parameters) throws RecognitionException {
return withJobParameters(parameters, () -> transform(str));
}
}

0 comments on commit 896ae3a

Please sign in to comment.