Top Description Fields Constructors Methods
org.jboss.marshalling.util

public final Class IdentityIntSet<T>

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.security.AccessController, .PrivilegedAction, java.util.Arrays

An efficient identity object set.

Field Summary

Modifier and TypeField and Description
private int
private static final int
private final int
private Object[]
private final float
private static final int
private int

Constructor Summary

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

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

public
IdentityIntSet(final float
the load factor
loadFactor
)

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

public
IdentityIntSet(final int
the initial capacity
initialCapacity
)

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

public
IdentityIntSet()

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 boolean

Returns:

true if the object was added, or false if it was already in the set
add
(T
the key
key
)

Add a value into the set, if it's not already in there.

public void
public IdentityIntSet<T>

Returns:

a cloned set
clone
()

Overrides java.lang.Object.clone.

Clone this set.
public boolean

Returns:

true if the object is present in the set
contains
(T
the key
key
)

Check to see if this set contains a value.

private void
init()

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
DEFAULT_REINITIALIZE_CAPACITY_THRESHOLDback to summary
private static final int DEFAULT_REINITIALIZE_CAPACITY_THRESHOLD
initialCapacityback to summary
private final int initialCapacity
keysback to summary
private Object[] keys
loadFactorback to summary
private final float loadFactor
REINITIALIZE_CAPACITY_THRESHOLDback to summary
private static final int REINITIALIZE_CAPACITY_THRESHOLD
resizeCountback to summary
private int resizeCount

Constructor Detail

IdentityIntSetback to summary
public IdentityIntSet(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

IdentityIntSetback to summary
public IdentityIntSet(final float loadFactor)

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

Parameters
loadFactor:float

the load factor

IdentityIntSetback to summary
public IdentityIntSet(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

IdentityIntSetback to summary
public IdentityIntSet()

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

Method Detail

addback to summary
public boolean add(T key)

Add a value into the set, if it's not already in there.

Parameters
key:T

the key

Returns:boolean

true if the object was added, or false if it was already in the set

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

Overrides java.lang.Object.clone.

Clone this set.

Returns:IdentityIntSet<T>

a cloned set

Annotations
@SuppressWarnings:unchecked
containsback to summary
public boolean contains(T key)

Check to see if this set contains a value.

Parameters
key:T

the key

Returns:boolean

true if the object is present in the set

initback to summary
private void init()
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