LiteralBuilder (@NotNull String literal, Function<String, String>... capitalizations) { if (capitalizations.length == 0) { myResult.add(literal); } else { for (Function<String, String> next : capitalizations) { myResult.add(next.apply(literal)); } } return this; }