Package org.jboss.marshalling.util
Class IntSet<T>
java.lang.Object
org.jboss.marshalling.util.IntSet<T>
- All Implemented Interfaces:
Cloneable
An efficient object set.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntSet()
Construct a new instance with an initial capacity of 64 and a load factor of0.5
.IntSet
(float loadFactor) Construct a new instance with the given load factor and an initial capacity of 64.IntSet
(int initialCapacity) Construct a new instance with the given initial capacity and a load factor of0.5
.IntSet
(int initialCapacity, float loadFactor) Construct a new instance with the given initial capacity and load factor. -
Method Summary
-
Field Details
-
keys
-
count
private int count -
resizeCount
private int resizeCount
-
-
Constructor Details
-
IntSet
public IntSet(int initialCapacity, float loadFactor) Construct a new instance with the given initial capacity and load factor.- Parameters:
initialCapacity
- the initial capacityloadFactor
- the load factor
-
IntSet
public IntSet(float loadFactor) Construct a new instance with the given load factor and an initial capacity of 64.- Parameters:
loadFactor
- the load factor
-
IntSet
public IntSet(int initialCapacity) Construct a new instance with the given initial capacity and a load factor of0.5
.- Parameters:
initialCapacity
- the initial capacity
-
IntSet
public IntSet()Construct a new instance with an initial capacity of 64 and a load factor of0.5
.
-
-
Method Details
-
clone
Clone this set. -
contains
Check to see if this set contains a value.- Parameters:
key
- the key- Returns:
true
if the object is present in the set
-
add
Add a value into the set, if it's not already in there.- Parameters:
key
- the key- Returns:
true
if the object was added, orfalse
if it was already in the set
-
resize
private void resize() -
clear
public void clear() -
toString
Get a string summary representation of this map.
-