--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimeoutMap.java 2009/10/09 08:53:03 429 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/TimeoutMap.java 2009/10/09 09:06:43 430 @@ -1,9 +1,10 @@ package dk.thoerup.traininfoservice.banedk; -import java.util.concurrent.ConcurrentHashMap; +import java.util.ArrayList; import java.util.Collection; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; @@ -43,9 +44,7 @@ @Override public boolean containsValue(Object arg0) { - //TODO someday implement this - throw new UnsupportedOperationException(); - + return values().contains(arg0); } @Override @@ -66,8 +65,9 @@ @Override public void putAll(Map arg0) { - //TODO someday implement this - throw new UnsupportedOperationException(); + for(K key : arg0.keySet()) { + this.put(key, arg0.get(key) ); + } } @Override @@ -82,8 +82,13 @@ @Override public Collection values() { - //TODO someday implement this - throw new UnsupportedOperationException(); + ArrayList values = new ArrayList(); + for (CacheItem item : cache.values()) { + values.add( item.value ); + } + + return values; + } @Override