Fixed bugs to Dictionary Classes

This commit is contained in:
2014-05-17 23:17:11 +02:00
parent 4dab60c3fa
commit f1e6f18939
6 changed files with 96 additions and 39 deletions

View File

@@ -62,6 +62,18 @@ public class LogFile<K,V> implements Dictionary<K,V> {
return t;
}
protected Entry<K, V> insert(Entry<K,V> in_e) throws InvalidKeyException {
//in_e not used because used internally
LocationAwareEntry<K,V> t = (LocationAwareEntry<K,V>)in_e;
list.addLast(t);
t.setLocation(list.last());
return t;
}
@Override
public Entry<K, V> remove(Entry<K, V> e) throws InvalidEntryException {
LocationAwareEntry<K,V> t = checkEntry(e);