class CachedIndex implements LookupIndexIF<K, E> {

  @Override
  public E get(K key) {
    Entry entry = data[(key.hashCode() & 0x7FFFFFFF) % data.length];

    while (entry != null && !entry.key.equals(key))
      entry = entry.next;

    lookups++;
    if (entry == null) { // not found
      E result = fallback.get(key);
      if (result == null && !nulls) return null; // do not store null values
      entry = addEntry(new Entry(key, result));
    } else {
      hits++;
      entry.hits++;
    }

    return (E) entry.value;
  }

  public  CachedIndex(LookupIndexIF<K, E> fallback);
  public  CachedIndex(LookupIndexIF<K, E> fallback, boolean nulls);
  public  CachedIndex(LookupIndexIF<K, E> fallback, int max, int size, boolean nulls);

}