改用 ValueSet 的静态工厂方法。
parent
92896a0345
commit
f83a05e429
|
@ -23,7 +23,7 @@ public final class AccountStatus extends Enumeration<AccountStatus> implements I
|
|||
public static final AccountStatus AVAILABLE = new AccountStatus(0, "账号正常");
|
||||
public static final AccountStatus LOCKED = new AccountStatus(1, "账号被锁定");
|
||||
|
||||
private static final ValueSet<AccountStatus> VALUE_SET = new ValueSet<>(
|
||||
private static final ValueSet<AccountStatus> VALUE_SET = ValueSet.of(
|
||||
AVAILABLE,
|
||||
LOCKED);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class Sex extends Enumeration<Sex> implements IValueObject {
|
|||
super(id, name);
|
||||
}
|
||||
|
||||
private static final ValueSet<Sex> VALUE_SET = new ValueSet<>(UNSET, MALE, FEMALE);
|
||||
private static final ValueSet<Sex> VALUE_SET = ValueSet.of(UNSET, MALE, FEMALE);
|
||||
|
||||
@StaticFactoryMethod(Sex.class)
|
||||
public static Sex of(int value) {
|
||||
|
|
Loading…
Reference in New Issue