Package org.jboss.marshalling.util
Class IdentityIntSet<T>
- java.lang.Object
-
- org.jboss.marshalling.util.IdentityIntSet<T>
-
-
Constructor Summary
Constructors Constructor Description IdentityIntSet()Construct a new instance with an initial capacity of 64 and a load factor of0.5.IdentityIntSet(float loadFactor)Construct a new instance with the given load factor and an initial capacity of 64.IdentityIntSet(int initialCapacity)Construct a new instance with the given initial capacity and a load factor of0.5.IdentityIntSet(int initialCapacity, float loadFactor)Construct a new instance with the given initial capacity and load factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T key)Add a value into the set, if it's not already in there.voidclear()IdentityIntSet<T>clone()Clone this set.booleancontains(T key)Check to see if this set contains a value.StringtoString()Get a string summary representation of this map.
-
-
-
Constructor Detail
-
IdentityIntSet
public IdentityIntSet(int initialCapacity, float loadFactor)Construct a new instance with the given initial capacity and load factor.- Parameters:
initialCapacity- the initial capacityloadFactor- the load factor
-
IdentityIntSet
public IdentityIntSet(float loadFactor)
Construct a new instance with the given load factor and an initial capacity of 64.- Parameters:
loadFactor- the load factor
-
IdentityIntSet
public IdentityIntSet(int initialCapacity)
Construct a new instance with the given initial capacity and a load factor of0.5.- Parameters:
initialCapacity- the initial capacity
-
IdentityIntSet
public IdentityIntSet()
Construct a new instance with an initial capacity of 64 and a load factor of0.5.
-
-
Method Detail
-
clone
public IdentityIntSet<T> clone()
Clone this set.
-
contains
public boolean contains(T key)
Check to see if this set contains a value.- Parameters:
key- the key- Returns:
trueif the object is present in the set
-
add
public boolean add(T key)
Add a value into the set, if it's not already in there.- Parameters:
key- the key- Returns:
trueif the object was added, orfalseif it was already in the set
-
clear
public void clear()
-
-