Javolution 6.0.0 java
|
Public Member Functions | |
FractalMapImpl () | |
FractalMapImpl (int shift) | |
MapEntryImpl | addEntry (MapEntryImpl newEntry, Object key, int hash) |
void | clear () |
MapEntryImpl | getEntry (Object key, int hash) |
MapEntryImpl | removeEntry (Object key, int hash) |
Static Package Attributes | |
static final int | EMPTINESS_LEVEL = 2 |
static final int | INITIAL_BLOCK_CAPACITY = 2 << EMPTINESS_LEVEL |
static final int | SHIFT = 10 |
Private Member Functions | |
int | indexOfKey (Object key, int hash) |
void | resize (int newCapacity) |
Private Attributes | |
int | count |
MapEntryImpl[] | entries = new MapEntryImpl[INITIAL_BLOCK_CAPACITY] |
final int | shift |
A fractal-based map with rehash performed only on limited size maps. It is based on a fractal structure with self-similar patterns at any scale (maps holding submaps). At each depth only a part of the hashcode is used starting by the last bits.
Definition at line 18 of file FractalMapImpl.java.
javolution.util.internal.map.FractalMapImpl.FractalMapImpl | ( | ) |
Definition at line 28 of file FractalMapImpl.java.
javolution.util.internal.map.FractalMapImpl.FractalMapImpl | ( | int | shift | ) |
Definition at line 32 of file FractalMapImpl.java.
MapEntryImpl javolution.util.internal.map.FractalMapImpl.addEntry | ( | MapEntryImpl | newEntry, |
Object | key, | ||
int | hash | ||
) |
Adds the specified entry if not already present; returns either the specified entry or an existing entry for the specified key.
Definition at line 39 of file FractalMapImpl.java.
References javolution.util.internal.map.MapEntryImpl< K, V >.key.
Referenced by javolution.util.internal.map.FastMapImpl< K, V >.put(), and javolution.util.internal.map.FastMapImpl< K, V >.putIfAbsent().
void javolution.util.internal.map.FractalMapImpl.clear | ( | ) |
Definition at line 53 of file FractalMapImpl.java.
MapEntryImpl javolution.util.internal.map.FractalMapImpl.getEntry | ( | Object | key, |
int | hash | ||
) |
Returns null if no entry with specified key
Definition at line 59 of file FractalMapImpl.java.
Referenced by javolution.util.internal.map.FastMapImpl< K, V >.containsKey(), javolution.util.internal.map.FastMapImpl< K, V >.get(), javolution.util.internal.map.FastMapImpl< K, V >.remove(), and javolution.util.internal.map.FastMapImpl< K, V >.replace().
|
private |
Returns the index of the specified key in the map (points to a null key if key not present).
Definition at line 91 of file FractalMapImpl.java.
References javolution.util.internal.map.MapEntryImpl< K, V >.hash, and javolution.util.internal.map.MapEntryImpl< K, V >.key.
MapEntryImpl javolution.util.internal.map.FractalMapImpl.removeEntry | ( | Object | key, |
int | hash | ||
) |
Returns the entry removed or null if none.
Definition at line 64 of file FractalMapImpl.java.
References javolution.util.internal.map.MapEntryImpl< K, V >.hash, and javolution.util.internal.map.MapEntryImpl< K, V >.key.
Referenced by javolution.util.internal.map.FastMapImpl< K, V >.iterator(), and javolution.util.internal.map.FastMapImpl< K, V >.remove().
|
private |
Definition at line 105 of file FractalMapImpl.java.
References javolution.util.internal.map.MapEntryImpl< K, V >.hash.
|
private |
Definition at line 24 of file FractalMapImpl.java.
|
staticpackage |
Definition at line 20 of file FractalMapImpl.java.
|
private |
Definition at line 25 of file FractalMapImpl.java.
|
staticpackage |
Definition at line 21 of file FractalMapImpl.java.
|
staticpackage |
Definition at line 22 of file FractalMapImpl.java.
|
private |
Definition at line 26 of file FractalMapImpl.java.