diff options
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/common/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java b/common/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java deleted file mode 100644 index 0d668c6..0000000 --- a/common/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -package dev.isxander.yacl.impl; - -import dev.isxander.yacl.api.Binding; - -import java.util.function.Consumer; -import java.util.function.Supplier; - -public final class GenericBindingImpl<T> implements Binding<T> { - private final T def; - private final Supplier<T> getter; - private final Consumer<T> setter; - - public GenericBindingImpl(T def, Supplier<T> getter, Consumer<T> setting) { - this.def = def; - this.getter = getter; - this.setter = setting; - } - - - @Override - public void setValue(T value) { - setter.accept(value); - } - - @Override - public T getValue() { - return getter.get(); - } - - @Override - public T defaultValue() { - return def; - } - -} |