Skip to content

Instantly share code, notes, and snippets.

@Lambeaux
Created April 27, 2018 00:17
Show Gist options
  • Save Lambeaux/99fc5e2dcd3ed19884667e9acd58b640 to your computer and use it in GitHub Desktop.
Save Lambeaux/99fc5e2dcd3ed19884667e9acd58b640 to your computer and use it in GitHub Desktop.
Unrelated object functional abstraction
private static <T> Map<Class<T>, Function<T, List<JAXBElement<?>>>> mappings() {
return ImmutableMap.<Class<T>, Function<T, List<JAXBElement<?>>>>builder()
.put(BinaryLogicOpType.class, new Function<BinaryLogicOpType, List<JAXBElement<?>>>() {
@Override
public List<JAXBElement<?>> apply(BinaryLogicOpType t) {
return null;
}
})
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment