Code example for LinkedHashMap

Methods: containsKey, get

0
		int id = getId(jsonObject);
		return getFromCache(id);
	} 
 
	protected Entity getFromCache(int id) {
		if (cache.containsKey(id)) {
			Entity entity = cache.get(id);
			System.out.println("[Cache]\t" + entity.toString());
			return entity;
		} else 
			return null; 
	} 
}