Top Description Fields Constructors Methods
org.wildfly.common.rpc

pack-priv final Class IdentityIntMap<T>

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.Arrays

An efficient identity object map whose keys are objects and whose values are ints.

Field Summary

Modifier and TypeField and Description
private int
private Object[]
private int
private int[]

Constructor Summary

AccessConstructor and Description
public
IdentityIntMap(int
the initial capacity
initialCapacity
,
final float
the load factor
loadFactor
)

Construct a new instance with the given initial capacity and load factor.

public
IdentityIntMap(final float
the load factor
loadFactor
)

Construct a new instance with the given load factor and an initial capacity of 64.

public
IdentityIntMap(final int
the initial capacity
initialCapacity
)

Construct a new instance with the given initial capacity and a load factor of 0.5.

public
IdentityIntMap()

Construct a new instance with an initial capacity of 64 and a load factor of 0.5.

Method Summary

Modifier and TypeMethod and Description
public void
public IdentityIntMap<T>

Returns:

a cloned map
clone
()

Overrides java.lang.Object.clone.

Clone this map.
public int

Returns:

the map value at the given key, or the value of defVal if it's not found
get
(T
the key
key
,
int
the value to return if the key is not found
defVal
)

Get a value from the map.

public void
put(T
the key
key
,
int
the value to store
value
)

Put a value into the map.

private void
public String

Returns:

a string representation
toString
()

Overrides java.lang.Object.toString.

Get a string summary representation of this map.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

countback to summary
private int count
keysback to summary
private Object[] keys
resizeCountback to summary
private int resizeCount
valuesback to summary
private int[] values

Constructor Detail

IdentityIntMapback to summary
public IdentityIntMap(int initialCapacity, final float loadFactor)

Construct a new instance with the given initial capacity and load factor.

Parameters
initialCapacity:int

the initial capacity

loadFactor:float

the load factor

IdentityIntMapback to summary
public IdentityIntMap(final float loadFactor)

Construct a new instance with the given load factor and an initial capacity of 64.

Parameters
loadFactor:float

the load factor

IdentityIntMapback to summary
public IdentityIntMap(final int initialCapacity)

Construct a new instance with the given initial capacity and a load factor of 0.5.

Parameters
initialCapacity:int

the initial capacity

IdentityIntMapback to summary
public IdentityIntMap()

Construct a new instance with an initial capacity of 64 and a load factor of 0.5.

Method Detail

clearback to summary
public void clear()
cloneback to summary
public IdentityIntMap<T> clone()

Overrides java.lang.Object.clone.

Clone this map.

Returns:IdentityIntMap<T>

a cloned map

Annotations
@SuppressWarnings:unchecked
getback to summary
public int get(T key, int defVal)

Get a value from the map.

Parameters
key:T

the key

defVal:int

the value to return if the key is not found

Returns:int

the map value at the given key, or the value of defVal if it's not found

putback to summary
public void put(T key, int value)

Put a value into the map. Any previous mapping is discarded silently.

Parameters
key:T

the key

value:int

the value to store

resizeback to summary
private void resize()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Get a string summary representation of this map.

Returns:String

a string representation