Skip to content

Instantly share code, notes, and snippets.

@cajar1988
Last active October 30, 2015 17:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cajar1988/f56ec8b58637f7d6eb93 to your computer and use it in GitHub Desktop.
With Lombok
package eu.lockup.tests;
import lombok.Getter;
import lombok.Setter;
public class Person {
@Getter
private final String firstName;
@Getter
private final String lastName;
@Getter
private final int age;
@Getter
private final Address address;
@Getter
@Setter
private String hobby;
public Person(String firstName, String lastName, int age, Address address) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.address = address;
}
public Person(String firstName, String lastName, int age, Address address, String hobby) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.address = address;
this.hobby = hobby;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment