Instantly share code, notes, and snippets.

@cajar1988 /Person.java Secret
Last active Oct 30, 2015

Embed
What would you like to do?
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