org.epics.pvmanager
Class ValueCache<T>

java.lang.Object
  extended by org.epics.pvmanager.Function<T>
      extended by org.epics.pvmanager.ValueCache<T>
Type Parameters:
T - the type of the value held by the cache

public class ValueCache<T>
extends Function<T>

Represent a building block that can store a particular value

Author:
carcassi

Constructor Summary
ValueCache(java.lang.Class<T> dataType)
          Creates a new cache for the given data type.
 
Method Summary
 java.lang.Class<T> getType()
          The type of objects that this cache can contain.
 T getValue()
          Returns the value in the cache.
 void setValue(java.lang.Object newValue)
          Changes the value in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueCache

public ValueCache(java.lang.Class<T> dataType)
Creates a new cache for the given data type.

Parameters:
dataType - class token for the data type
Method Detail

getValue

public T getValue()
Returns the value in the cache.

Specified by:
getValue in class Function<T>
Returns:
value in the cache

setValue

public void setValue(java.lang.Object newValue)
Changes the value in the cache.

Parameters:
newValue - the new value

getType

public java.lang.Class<T> getType()
The type of objects that this cache can contain.

Returns:
the class token