改用 ValueSet 的静态工厂方法。

dev
ZhouXY108 2023-05-16 17:41:29 +08:00
parent 92896a0345
commit f83a05e429
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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) {