Skip to content

Instantly share code, notes, and snippets.

@meza
Created May 7, 2012 13:40
Show Gist options
  • Save meza/2627824 to your computer and use it in GitHub Desktop.
Save meza/2627824 to your computer and use it in GitHub Desktop.
ValueObject
class Book {
private String title;
private String author;
private int price;
public Book(String title, String author, int price) {
this.title = title;
this.author = author;
this.price = price;
}
public String title() {
return title;
}
public String author() {
return author;
}
public int price() {
return price
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment