Bucket
The Bucket
inner class defines buckets that are stored in this hash table.
Attributes
- Graph
-
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Add the given key-value pair to this bucket, returning true if successful and false otherwise (when this bucket is full).
Add the given key-value pair to this bucket, returning true if successful and false otherwise (when this bucket is full).
Value parameters
- k
-
the key
- v
-
the value
Attributes
Find key k in this bucket, returning the corresponding value or null if not found.
Find key k in this bucket, returning the corresponding value or null if not found.
Value parameters
- k
-
the key to find in this bucket
Attributes
Find the position of key k in this bucket, returning its position in the bucket, or -1 if not found.
Find the position of key k in this bucket, returning its position in the bucket, or -1 if not found.
Value parameters
- k
-
the key to find in this bucket
Attributes
Move the j-th element (key-value pair) to bucket b2, returning true if successful and false otherwise (when bucket b2 is full). Simply remove the j-th element when b2 is null.
Move the j-th element (key-value pair) to bucket b2, returning true if successful and false otherwise (when bucket b2 is full). Simply remove the j-th element when b2 is null.
Value parameters
- b2
-
the other bucket to move the pair to
- j
-
the j-th key-value pair
Attributes
Show/print the contents of this bucket.
Show/print the contents of this bucket.