Top Description Fields Constructors Methods
org.glassfish.pfl.basic.contain

public Class DenseIntMapImpl<E>

extends Object
implements IntMap<E>
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.contain.IntMap
Imports
java.util.ArrayList

Utility for managing mappings from densely allocated integer keys to arbitrary objects. This should only be used for keys in the range 0..max such that "most" of the key space is actually used.

Field Summary

Modifier and TypeField and Description
private ArrayList<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkKey(int key)

private void
extend(int index)

public E
get(int key)

Implements org.glassfish.pfl.basic.contain.IntMap.get.

If key >= 0, return the value bound to key, or null if none.

public void
set(int key, E value)

Implements org.glassfish.pfl.basic.contain.IntMap.set.

If key >= 0, bind value to the key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listback to summary
private ArrayList<E> list

Constructor Detail

DenseIntMapImplback to summary
public DenseIntMapImpl()

Method Detail

checkKeyback to summary
private void checkKey(int key)
extendback to summary
private void extend(int index)
getback to summary
public E get(int key)

Implements org.glassfish.pfl.basic.contain.IntMap.get.

If key >= 0, return the value bound to key, or null if none. Throws IllegalArgumentException if key <0.

setback to summary
public void set(int key, E value)

Implements org.glassfish.pfl.basic.contain.IntMap.set.

If key >= 0, bind value to the key. Throws IllegalArgumentException if key <0.