Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created October 26, 2011 12:01
Show Gist options
  • Select an option

  • Save Riduidel/1316141 to your computer and use it in GitHub Desktop.

Select an option

Save Riduidel/1316141 to your computer and use it in GitHub Desktop.
Un exemple avec setter fluent
public class Example {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Example withName(String name) {
this.setName(name);
return this;
}
public static void main(String[] args) {
Example e = new Example().withName("nice example, no ?");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment