public class CacheValue<T> extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
getValue()
Returns the actual underlying value.
|
int |
hashCode() |
boolean |
hasValue(T value)
Returns whether the cached value has the given actual value.
|
boolean |
isPresent()
Returns whether the cached value has an actual value.
|
static <T> CacheValue<T> |
ofNullable(T value)
Returns a new
CacheValue for the given value. |
public T getValue()
public boolean isPresent()
public boolean hasValue(T value)
value
- can be null;public static <T> CacheValue<T> ofNullable(T value)
CacheValue
for the given value.value
- can be null.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.