com.caucho.util
Class LongKeyMap

java.lang.Object
  extended by com.caucho.util.LongKeyMap

public class LongKeyMap
extends java.lang.Object

The LongKeyMap provides a simple hashmap from longs to values. The API is an abbreviation of the HashMap collection API.

The convenience of IntMap is avoiding all the silly wrapping of integers.


Constructor Summary
LongKeyMap()
          Create a new LongKeyMap.
 
Method Summary
 void clear()
          Clear the hashmap.
 java.lang.Object clone()
           
 java.lang.Object get(long key)
          Puts a new value in the property table with the appropriate flags
 java.util.Iterator iterator()
          Returns an iterator of the keys.
 java.lang.Object put(long key, java.lang.Object value)
          Puts a new value in the property table with the appropriate flags
 java.lang.Object remove(long key)
          Deletes the entry.
 int size()
          Returns the current number of entries in the map.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongKeyMap

public LongKeyMap()
Create a new LongKeyMap. Default size is 16.

Method Detail

clear

public void clear()
Clear the hashmap.


size

public int size()
Returns the current number of entries in the map.


get

public java.lang.Object get(long key)
Puts a new value in the property table with the appropriate flags


put

public java.lang.Object put(long key,
                            java.lang.Object value)
Puts a new value in the property table with the appropriate flags


remove

public java.lang.Object remove(long key)
Deletes the entry. Returns true if successful.


iterator

public java.util.Iterator iterator()
Returns an iterator of the keys.


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object