Ableverse™
Platform 6.0

av.util
Interface IntMap<T>

Type Parameters:
T - Type of values
All Known Implementing Classes:
HashIntMap

public interface IntMap<T>

This interface defines a map which takes int as the key. A Map with an Integer key type will have the same functionalities, this class exists only for performance.

Note if the int key for this map is calculated from some key objects, this map does NOT automatically clear its entry mapped to that key while the key object is garbage collected. So be careful if you fall in this case, unless references to this map is recycled frequently or you just want the value objects in this map to be kept non-garbage collectable even the key has been garbage collected, you may prefer using WeakHashMap by implementing Object.hashCode() and Object.equals(java.lang.Object) at your key class.

Author:
Compl

Method Summary
 void clear()
          clear the map
 T get(int id)
           
 void put(int id, T obj)
           
 T remove(int id)
           
 

Method Detail

get

T get(int id)
Parameters:
id -
Returns:
the value at id

put

void put(int id,
         T obj)
Parameters:
id -
obj -

remove

T remove(int id)
Parameters:
id -
Returns:
the old value at id

clear

void clear()
clear the map


Ableverse™
Platform 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.