package st.gaw.db;

import java.util.Map;

public class MapEntry<K, V> implements Map.Entry<K, V> {

	private final K mKey;
	private V mVal;

	public MapEntry(K key, V val) {
		if (null==key) throw new NullPointerException();
		mKey = key;
		mVal = val;
	}

	@Override
	public K getKey() {
		return mKey;
	}

	@Override
	public V getValue() {
		return mVal;
	}
	
	@Override
	public boolean equals(Object o) {
		if (this==o) return true;
		if (!(o instanceof MapEntry)) return false;
		return mKey.equals(((MapEntry<?, ?>) o).mKey);
	}
	
	@Override
	public int hashCode() {
		return mKey.hashCode();
	}

	@Override
	public V setValue(V newVal) {
		mVal = newVal;
		return mVal;
	}
	
	@Override
	public String toString() {
		return mKey.toString()+':'+(null==mVal ? null : mVal.toString());
	}
}
@@ -26,21 +26,25 @@
 ort 
-java
+android
 .util.
-Map
+Pair
 ;%0D%0A%0D
@@ -76,40 +76,31 @@
  V%3E 
-implements Map.Entry
+extends Pair
 %3CK,
- 
 V%3E %7B%0D%0A%0D%0A
 %09pri
@@ -99,52 +99,8 @@
 %0D%0A%0D%0A
-%09private final K mKey;%0D%0A%09private V mVal;%0D%0A%0D%0A
 %09pub
@@ -125,24 +125,44 @@
 , V val) %7B%0D%0A
+%09%09super(key, val);%0D%0A
 %09%09if (null==
@@ -180,79 +180,41 @@
 new 
-NullPointerException();%0D%0A%09%09mKey = key;%0D%0A%09%09mVal = val;%0D%0A%09%7D%0D%0A%0D%0A%09@Override
+IllegalArgumentException();%0D%0A%09%7D%0D%0A
 %0D%0A%09p
@@ -242,20 +242,21 @@
 %09return 
-mKey
+first
 ;%0D%0A%09%7D%0D%0A%0D
@@ -252,36 +252,24 @@
 rst;%0D%0A%09%7D%0D%0A%0D%0A
-%09@Override%0D%0A
 %09public V ge
@@ -293,213 +293,22 @@
 urn 
-mVal;%0D%0A%09%7D%0D%0A%09%0D%0A%09@Override%0D%0A%09public boolean equals(Object o) %7B%0D%0A%09%09if (this==o) return true;%0D%0A%09%09if (!(o instanceof MapEntry)) return false;%0D%0A%09%09return mKey.equals(((MapEntry%3C?, ?%3E) o).mKey);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Override
+second;%0D%0A%09%7D%0D%0A%09
 %0D%0A%09p
@@ -340,20 +340,21 @@
 %09return 
-mKey
+first
 .hashCod
@@ -366,92 +366,8 @@
 %0A%09%7D%0D
-%0A%0D%0A%09@Override%0D%0A%09public V setValue(V newVal) %7B%0D%0A%09%09mVal = newVal;%0D%0A%09%09return mVal;%0D%0A%09%7D%0D
 %0A%09%0D%0A
@@ -420,12 +420,13 @@
 urn 
-mKey
+first
 .toS
@@ -444,20 +444,22 @@
 +(null==
-mVal
+second
  ? null 
@@ -464,12 +464,14 @@
 l : 
-mVal
+second
 .toS

make MapEntry depend on Android's Pair class