Added interface HashIntMap.Entry, which extends Map.Entry with a

getIntKey() so that we can avoid all this pointless Integer object
wrapping.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1278 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2003-10-24 22:10:16 +00:00
parent 3227b27ef4
commit a14b28ab24
@@ -1,5 +1,5 @@
// //
// $Id: HashIntMap.java,v 1.11 2003/06/05 18:19:11 mdb Exp $ // $Id: HashIntMap.java,v 1.12 2003/10/24 22:10:16 ray Exp $
// //
// samskivert library - useful routines for java programs // samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne // Copyright (C) 2001 Michael Bayne
@@ -41,6 +41,11 @@ import java.util.Set;
public class HashIntMap public class HashIntMap
extends AbstractMap implements IntMap, Serializable extends AbstractMap implements IntMap, Serializable
{ {
public interface Entry extends AbstractMap.Entry
{
public int getIntKey ();
}
/** /**
* The default number of buckets to use for the hash table. * The default number of buckets to use for the hash table.
*/ */
@@ -441,6 +446,11 @@ public class HashIntMap
return new Integer(key); return new Integer(key);
} }
public int getIntKey ()
{
return key;
}
public Object getValue () public Object getValue ()
{ {
return value; return value;