Code example for Cache

Methods: getIfPresentput

0
		return parser.getDataVersion();
	} 
 
	@Override 
	public ReadableUserAgent parse(final String userAgentString) {
		ReadableUserAgent result = cache.getIfPresent(userAgentString);
		if (result == null) {
			result = parser.parse(userAgentString);
			cache.put(userAgentString, result);
		} 
		return result;
	} 
 
	@Override 
	public void shutdown() { 
		parser.shutdown();
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java