Package org.fressian.impl
Class InterleavedIndexHopMap
java.lang.Object
org.fressian.impl.InterleavedIndexHopMap
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InterleavedIndexHopMap
public InterleavedIndexHopMap() -
InterleavedIndexHopMap
public InterleavedIndexHopMap(int capacity)
-
-
Method Details
-
clear
public void clear() -
get
- Parameters:
k
- , non-null- Returns:
- the integer associated with k, or -1 if not present
-
oldIndex
Puts k in the map if it was not already present. Returns -1 if k was freshly added Returns k's index if k was already in the map.- Parameters:
k
- , non-null- Returns:
- the integer associated with k or -1
-
isEmpty
public boolean isEmpty() -
intern
Puts k in the map (if not present) and assigns and returns the index associated with it assigns ints monotonically from 0- Parameters:
k
- , non-null- Returns:
- the integer associated with k
-
main
-