public Object get(String key){
System.out.println(_cache.size() +" "+ _counter);
for(int i = 0; i<_cache.size(); i++){
- if( _cache.get(i) != null && ((Entry)_cache.get(i)).getKey(key).equals(key) )
+ if( _cache.get(i) != null &&
+ ((Entry)_cache.get(i)).getKey(key) != null &&
+ ((Entry)_cache.get(i)).getKey(key).equals(key) ) {
System.out.println("test2: "+((Entry)_cache.get(i)).getKey(key));
return ((Entry)_cache.get(i)).getValue();
+ }
}
return null;
}