T
- the type of the value held by the cachepublic class ValueCacheImpl<T> extends Object implements ValueCache<T>
Constructor and Description |
---|
ValueCacheImpl(Class<T> dataType)
Creates a new cache for the given data type.
|
Modifier and Type | Method and Description |
---|---|
Class<T> |
getType()
The type of objects that this cache can contain.
|
T |
readValue()
Returns the value in the cache.
|
void |
writeValue(Object newValue)
Changes the value in the cache.
|
public T readValue()
readValue
in interface ReadFunction<T>
public void writeValue(Object newValue)
writeValue
in interface WriteFunction<T>
newValue
- the new valuepublic Class<T> getType()
getType
in interface ValueCache<T>
Copyright © 2015. All rights reserved.