Helper methods and unit tests for BdfList/Dictionary.

This commit is contained in:
akwizgran
2016-02-26 16:27:24 +00:00
parent 76e6b7cfa9
commit e28dc17881
5 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package org.briarproject.api.data;
import java.util.Map.Entry;
// This class is not thread-safe
public class BdfEntry implements Entry<String, Object> {
private final String key;
private Object value;
public BdfEntry(String key, Object value) {
this.key = key;
this.value = value;
}
@Override
public String getKey() {
return key;
}
@Override
public Object getValue() {
return value;
}
@Override
public Object setValue(Object value) {
Object oldValue = this.value;
this.value = value;
return oldValue;
}
}