/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimeoutMap.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimeoutMap.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 430 by torben, Fri Oct 9 09:06:43 2009 UTC revision 804 by torben, Mon Jun 7 12:13:10 2010 UTC
# Line 36  public class TimeoutMap<K,V> implements Line 36  public class TimeoutMap<K,V> implements
36          }          }
37    
38          @Override          @Override
39          public boolean containsKey(Object arg0) {          public boolean containsKey(Object key) {
40                  CacheItem<V> item = cache.get(arg0);                  return cache.containsKey(key);
                   
                 return (item != null);  
41          }          }
42    
43          @Override          @Override
# Line 113  public class TimeoutMap<K,V> implements Line 111  public class TimeoutMap<K,V> implements
111          public V put(K key, V value) {                    public V put(K key, V value) {          
112                  CacheItem<V> item= new CacheItem<V>(value);                  CacheItem<V> item= new CacheItem<V>(value);
113                                    
114                  return cache.put(key, item).value;                  item = cache.put(key, item);
115                    
116                    if (item != null)
117                            return item.value;
118                    else
119                            return null;
120          }          }
121                    
122  }  }

Legend:
Removed from v.430  
changed lines
  Added in v.804

  ViewVC Help
Powered by ViewVC 1.1.20