FileDocCategorySizeDatePackage
Bucket.javaAPI DocGlassfish v2 API4781Fri May 04 22:32:10 BST 2007com.sun.enterprise.util.collection

Bucket

public interface Bucket
A bucket is esentially a list of entries that can be accessed through a primitive typed key. Buckets are used in building primitive typed HashMaps. See IntHashMap for more details.

Fields Summary
Constructors Summary
Methods Summary
public booleancontainsKey(int key)
Check if the bucket contains the key.

param
key The key (can be negative).
return
true if the bucket contains the key or null otherwise.

public booleancontainsKey(long key)

public java.util.IteratorentryIterator()
Get an iterator for iteraing through all entries in the bucket.

return
An iterator. iterator.next() returns an IntEntry.

public java.lang.Objectget(int key)
Get an object into the bucket using the key.

param
key The key (can be negative) for retrieving object.
return
The object that was associated using the same key or null otherwise.

public java.lang.Objectget(long key)

public java.util.Iteratoriterator()
Get an iterator for iteraing through all objects in the bucket.

return
An iterator. iterator.next() returns an object.

public java.lang.Objectput(int key, java.lang.Object object)
Put an object into the bucket using the key. The key can be used to retrieve the object later.

param
key The key (can be negative).
param
object The object to be put in the bucket.
return
Any old object that was associated using the same key or null otherwise.

public java.lang.Objectput(long key, java.lang.Object object)

public java.lang.Objectremove(int key)
Remove an object from the bucket using the key.

param
key The key (can be negative).
return
The object that was associated using the same key or null otherwise.

public java.lang.Objectremove(long key)

public intsize()
Return the size of the bucket.

return
The number of items in the bucket