mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Ref.deref convenience method
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user