exactly what the javadoc says, its a map that does not need to store a key object. so it is smaller than a regular hashmap when serialized or kept in memory.
-igor On Thu, Feb 12, 2009 at 1:40 PM, Tuomas Kärkkäinen <[email protected]> wrote: > Hi, > > I was looking at IntHashMap in wicket trunk. > > I couldn't figure out what it does. > > The implementation of hashcode for Integer is value, and the autoboxing of > int to Integer comes out to Integer.valueOf(int) which is implemented as an > array lookup for Integers in the range of -128 to 127, and beyond that it's > just new Integer(int). Page ids start at zero for each page in each session > so most of the time they will be between zero and 127. > > Br, > Tuomas > >
