Ref.deref convenience method

This commit is contained in:
Anton Makeev
2015-07-02 16:24:04 +02:00
parent 4684772197
commit 1b9455cf11
@@ -59,6 +59,11 @@ public class Ref<T> {
return new Ref<T>(value);
}
@Nullable
public static <T> T deref(@Nullable Ref<T> ref) {
return ref == null ? null : ref.get();
}
@Override
public String toString() {
return String.valueOf(myValue);