| Modifier and Type | Field and Description |
|---|---|
SimpleList<T>[] |
buckets |
protected static int |
DEFAULT_BUCKET_SIZE |
| Constructor and Description |
|---|
SimpleHashTable(int width) |
SimpleHashTable(int width,
int initialBucketSize) |
| Modifier and Type | Method and Description |
|---|---|
SimpleList<T> |
bucket(long key) |
void |
clear() |
protected void |
clearBucket(int index) |
protected SimpleList<T> |
getBucket(int index) |
int |
index(long key) |
protected SimpleList<T> |
newList(int initialBucketSize) |
void |
put(long key,
T value) |
protected static final int DEFAULT_BUCKET_SIZE
public final SimpleList<T>[] buckets
public SimpleHashTable(int width)
public SimpleHashTable(int width,
int initialBucketSize)
protected SimpleList<T> newList(int initialBucketSize)
public void put(long key,
T value)
public SimpleList<T> bucket(long key)
protected SimpleList<T> getBucket(int index)
public int index(long key)
public void clear()
protected void clearBucket(int index)
Copyright © 2014–2016 Nikolche Mihajlovski and contributors. All rights reserved.