Created
March 9, 2017 17:52
-
-
Save alainlompo/004165e7a8373f32b2236422c0ce093b to your computer and use it in GitHub Desktop.
Lombok annotations samples: @DaTa generates getters and setters. @EqualsAndHashCode generates equals and hashCode methods without calling super. AccessLevel allows a finer specification of visibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import lombok.AccessLevel; | |
import lombok.Data; | |
import lombok.EqualsAndHashCode; | |
import lombok.Getter; | |
import lombok.Setter; | |
@Data | |
@EqualsAndHashCode(callSuper=false) | |
public class Asset extends Resource{ | |
@Getter(AccessLevel.PROTECTED) | |
@Setter(AccessLevel.PROTECTED) | |
private BigDecimal monetaryValueInReportingCurrency; | |
public Asset(String name, String description) { | |
super(name, description); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment