X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2FTestValue.java;fp=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2FTestValue.java;h=0000000000000000000000000000000000000000;hb=eb32457356fac09e16ec98394c1b5d48f9dfba84;hp=43cf0a6dbf456e56f768c9c815e705b58b406135;hpb=ec655d61682a70063c1cf540fe3e41613aaf71a5;p=Sone.git
diff --git a/src/test/java/net/pterodactylus/sone/TestValue.java b/src/test/java/net/pterodactylus/sone/TestValue.java
deleted file mode 100644
index 43cf0a6..0000000
--- a/src/test/java/net/pterodactylus/sone/TestValue.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package net.pterodactylus.sone;
-
-import java.util.concurrent.atomic.AtomicReference;
-
-import net.pterodactylus.util.config.ConfigurationException;
-import net.pterodactylus.util.config.Value;
-
-import com.google.common.base.Objects;
-
-/**
- * Simple {@link Value} implementation.
- *
- * @author David âBombeâ Roden
- */
-public class TestValue implements Value {
-
- private final AtomicReference value = new AtomicReference();
-
- public TestValue(T originalValue) {
- value.set(originalValue);
- }
-
- @Override
- public T getValue() throws ConfigurationException {
- return value.get();
- }
-
- @Override
- public T getValue(T defaultValue) {
- final T realValue = value.get();
- return (realValue != null) ? realValue : defaultValue;
- }
-
- @Override
- public void setValue(T newValue) throws ConfigurationException {
- value.set(newValue);
- }
-
- @Override
- public int hashCode() {
- return value.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return (obj instanceof TestValue) && Objects.equal(value.get(),
- ((TestValue) obj).value.get());
- }
-
- @Override
- public String toString() {
- return String.valueOf(value.get());
- }
-
- public static Value from(T value) {
- return new TestValue(value);
- }
-
-}