com.android.ide.common.util
Class ReferenceHolder<T>

java.lang.Object
  extended by com.android.ide.common.util.ReferenceHolder<T>

public class ReferenceHolder<T>
extends java.lang.Object

A simple holder for a reference. This is mutable (unlike Optional), and more light weight than Atomic*, however this is not thread-safe at all.


Method Summary
static
<T> ReferenceHolder<T>
empty()
           
 T getValue()
           
static
<T> ReferenceHolder<T>
of(T value)
           
 T setValue(T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static <T> ReferenceHolder<T> of(T value)

empty

public static <T> ReferenceHolder<T> empty()

getValue

public T getValue()

setValue

public T setValue(T value)