Constructor and Description |
---|
IdentityIntMap()
Construct a new instance with an initial capacity of 64 and a load factor of
0.5 . |
IdentityIntMap(float loadFactor)
Construct a new instance with the given load factor and an initial capacity of 64.
|
IdentityIntMap(int initialCapacity)
Construct a new instance with the given initial capacity and a load factor of
0.5 . |
IdentityIntMap(int initialCapacity,
float loadFactor)
Construct a new instance with the given initial capacity and load factor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
IdentityIntMap<T> |
clone()
Clone this map.
|
int |
get(T key,
int defVal)
Get a value from the map.
|
void |
put(T key,
int value)
Put a value into the map.
|
String |
toString()
Get a string summary representation of this map.
|
public IdentityIntMap(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacityloadFactor
- the load factorpublic IdentityIntMap(float loadFactor)
loadFactor
- the load factorpublic IdentityIntMap(int initialCapacity)
0.5
.initialCapacity
- the initial capacitypublic IdentityIntMap()
0.5
.public IdentityIntMap<T> clone()
public int get(T key, int defVal)
key
- the keydefVal
- the value to return if the key is not founddefVal
if it's not foundpublic void put(T key, int value)
key
- the keyvalue
- the value to storepublic void clear()
Copyright © 2019 JBoss by Red Hat. All rights reserved.