Skip to content

Instantly share code, notes, and snippets.

@bigkahuna1uk
Created June 8, 2013 12:35
public abstract class MessageBuilder<M> {
private String name;
private String id;
public abstract M build();
String getId() {
return id;
}
String getName() {
return name;
}
public MessageBuilder<M> withId(final String id) {
this.id = id;
return this;
}
public MessageBuilder<M> withName(final String name) {
this.name = name;
return this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment