1 2 3 4 5 6 7 8 9 10 11
import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor(access=AccessLevel.PRIVATE) enum GetterEnum { ONE(1, "One") ; @Getter private final int id; @Getter private final String name; }