All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gawst.asyncdb.MapEntry Maven / Gradle / Ivy

Go to download

A set of helper class to keep a copy of small SQLite databases in memory in Android

There is a newer version: 3.1.1
Show newest version
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());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy