aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl3/impl/SafeBinding.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/isxander/yacl3/impl/SafeBinding.java')
-rw-r--r--src/main/java/dev/isxander/yacl3/impl/SafeBinding.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/java/dev/isxander/yacl3/impl/SafeBinding.java b/src/main/java/dev/isxander/yacl3/impl/SafeBinding.java
deleted file mode 100644
index c55d2be..0000000
--- a/src/main/java/dev/isxander/yacl3/impl/SafeBinding.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package dev.isxander.yacl3.impl;
-
-import dev.isxander.yacl3.api.Binding;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.Objects;
-
-public class SafeBinding<T> implements Binding<T> {
- private final Binding<T> binding;
-
- public SafeBinding(Binding<T> binding) {
- this.binding = binding;
- }
-
- @Override
- public @NotNull T getValue() {
- return Objects.requireNonNull(binding.getValue());
- }
-
- @Override
- public void setValue(@NotNull T value) {
- binding.setValue(Objects.requireNonNull(value));
- }
-
- @Override
- public @NotNull T defaultValue() {
- return Objects.requireNonNull(binding.defaultValue());
- }
-}