Lazy#of -> Lazy#lazy

This commit is contained in:
dfsek
2021-07-24 20:14:19 -07:00
parent 074528003b
commit f73366fcb3
5 changed files with 5 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ import java.util.Collection;
public interface EnumProperty<T extends Enum<T>> extends Property<T> {
static <T extends Enum<T>> EnumProperty<T> of(String name, Class<T> clazz) {
return new EnumProperty<T>() {
private final Lazy<Collection<T>> constants = Lazy.of(() -> Arrays.asList(clazz.getEnumConstants()));
private final Lazy<Collection<T>> constants = Lazy.lazy(() -> Arrays.asList(clazz.getEnumConstants()));
@Override
public Class<T> getType() {

View File

@@ -11,7 +11,7 @@ public final class Lazy<T> {
this.valueSupplier = valueSupplier;
}
public static <T> Lazy<T> of(Supplier<T> valueSupplier) {
public static <T> Lazy<T> lazy(Supplier<T> valueSupplier) {
return new Lazy<>(valueSupplier);
}