org.gawst.asyncdb.MapEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asyncdb Show documentation
Show all versions of asyncdb Show documentation
A set of helper class to keep a copy of small SQLite databases in memory in Android
package org.gawst.asyncdb;
import android.util.Pair;
/**
* Basic Key/Value object.
* @param Type of the key.
* @param Type of the value.
*/
public class MapEntry extends Pair {
public MapEntry(K key, V val) {
super(key, val);
if (null==key) throw new IllegalArgumentException();
}
public K getKey() {
return first;
}
public V getValue() {
return second;
}
public int hashCode() {
return first.hashCode();
}
@Override
public String toString() {
return first.toString()+':'+(null==second ? null : second.toString());
}
}