# Class InterleavedIndexHopMap

java.lang.Object
org.fressian.impl.InterleavedIndexHopMap

public final class InterleavedIndexHopMap extends Object

## Constructor Summary

Constructors
Constructor
Description
`InterleavedIndexHopMap()`
`InterleavedIndexHopMap(int capacity)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
`int`
`get(Object k)`
`int`
`intern(Object k)`
Puts k in the map (if not present) and assigns and returns the index associated with it assigns ints monotonically from 0
`boolean`
`isEmpty()`
`static void`
`main(String[] args)`
`int`
`oldIndex(Object k)`
Puts k in the map if it was not already present.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### InterleavedIndexHopMap

public InterleavedIndexHopMap()

### InterleavedIndexHopMap

public InterleavedIndexHopMap(int capacity)

## Method Details

### clear

public void clear()

### get

public int get(Object k)

Parameters:
  `k` - , non-null
Returns:
  the integer associated with k, or -1 if not present

### oldIndex

public int oldIndex(Object k)
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

public int intern(Object k)
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

public static void main(String[] args)