T - the class implemented by the cache valuespublic final class XPFCacheResult<T> extends Object
isPresent() will return true and
 get() will return the value.| Modifier and Type | Method and Description | 
|---|---|
static <T> XPFCacheResult<T> | 
create(T value)
Creates wrapper for given value. 
 | 
boolean | 
equals(Object obj)  | 
T | 
get()
If a value is present in this  
CacheResult, returns the value,
 otherwise throws NoSuchElementException. | 
int | 
hashCode()  | 
boolean | 
isPresent()
Return  
true if there is a value present, otherwise false. | 
static <T> XPFCacheResult<T> | 
notPresent()
Creates empty wrapper for absent result in the cache. 
 | 
public static <T> XPFCacheResult<T> create(T value)
T - the class implemented by the cache valuesvalue - given value to create wrapperpublic static <T> XPFCacheResult<T> notPresent()
T - the class implemented by the cache valuespublic T get()
CacheResult, returns the value,
 otherwise throws NoSuchElementException.CacheResultNoSuchElementException - if there is no value presentpublic boolean isPresent()
true if there is a value present, otherwise false.true if there is a value present, otherwise falseCopyright © 2024. All rights reserved.