Code example for Cache

Methods: get

0
    final Cache<T,T> items=CacheBuilder.newBuilder().maximumSize(10000).build();
 
    @Override 
    public T economize(final T that) {
        try { 
            return items.get(that,new Callable<T>() {
                @Override 
                public T call() throws Exception {
                    return that;
                }}); 
        } catch(ExecutionException ex) {
            throw new RuntimeException(ex);
        } 
    } 
 
 
} 
Connect your IDE to all the code out there  Get Codota for Java