Top Methods
org.eclipse.collections.api.set

public Interface Pool<V>


Method Summary

Modifier and TypeMethod and Description
public void
public V

Returns:

The object reference in the pool equal to key or null.
get
(V
the value to look for
key
)

Locates an object in the pool which is equal to key.

public V

Returns:

the object reference in the pool equal to key (either key itself or the existing reference)
put
(V
the value to add if not in the pool
key
)

Puts key into the pool.

public V

Returns:

The object reference in the pool equal to key or null.
removeFromPool
(V
object to remove
key
)

Locates an object in the pool which is equal to key and removes it.

public int
size()

Method Detail

clearback to summary
public void clear()
getback to summary
public V get(V key)

Locates an object in the pool which is equal to key.

Parameters
key:V

the value to look for

Returns:V

The object reference in the pool equal to key or null.

putback to summary
public V put(V key)

Puts key into the pool. If there is no existing object that is equal to key, key will be added to the pool and the return value will be the same instance. If there is an existing object in the pool that is equal to key, the pool will remain unchanged and the pooled instance will be is returned.

Parameters
key:V

the value to add if not in the pool

Returns:V

the object reference in the pool equal to key (either key itself or the existing reference)

removeFromPoolback to summary
public V removeFromPool(V key)

Locates an object in the pool which is equal to key and removes it.

Parameters
key:V

object to remove

Returns:V

The object reference in the pool equal to key or null.

sizeback to summary
public int size()