test_class.declarator: index
test_class.modifier: private
test_class.original_string: private CachedIndex index;
test_class.type: CachedIndex
test_class.var_name: index
test_class.file: ontopia-engine/src/test/java/net/ontopia/utils/CachedIndexTest.java
test_class.identifier: CachedIndexTest
test_case.body: @Test
    public void testEmpty() {
      Assert.assertTrue("found key in empty index",
             index.get("larsga") == null);
    }
test_case.class_method_signature: CachedIndexTest.testEmpty()
test_case.full_signature: @Test public void testEmpty()
test_case.identifier: testEmpty
test_case.invocations: assertTrue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmpty()
focal_class.declarator: fallback
focal_class.modifier: private
focal_class.original_string: private LookupIndexIF<K, E> fallback;
focal_class.type: LookupIndexIF<K, E>
focal_class.var_name: fallback
focal_class.declarator: max
focal_class.modifier: private
focal_class.original_string: private int           max;
focal_class.type: int
focal_class.var_name: max
focal_class.declarator: entries
focal_class.modifier: private
focal_class.original_string: private int           entries;
focal_class.type: int
focal_class.var_name: entries
focal_class.declarator: decay
focal_class.modifier: private
focal_class.original_string: private int           decay;
focal_class.type: int
focal_class.var_name: decay
focal_class.declarator: data
focal_class.modifier: private
focal_class.original_string: private Entry[]       data;
focal_class.type: Entry[]
focal_class.var_name: data
focal_class.declarator: threshold
focal_class.modifier: private
focal_class.original_string: private double        threshold;
focal_class.type: double
focal_class.var_name: threshold
focal_class.declarator: nulls
focal_class.modifier: private
focal_class.original_string: private boolean       nulls;
focal_class.type: boolean
focal_class.var_name: nulls
focal_class.declarator: lookups
focal_class.modifier: private
focal_class.original_string: private long          lookups;
focal_class.type: long
focal_class.var_name: lookups
focal_class.declarator: hits
focal_class.modifier: private
focal_class.original_string: private long          hits;
focal_class.type: long
focal_class.var_name: hits
focal_class.declarator: rehashes
focal_class.modifier: private
focal_class.original_string: private long          rehashes;
focal_class.type: long
focal_class.var_name: rehashes
focal_class.declarator: prunings
focal_class.modifier: private
focal_class.original_string: private long          prunings;
focal_class.type: long
focal_class.var_name: prunings
focal_class.file: ontopia-engine/src/main/java/net/ontopia/utils/CachedIndex.java
focal_class.identifier: CachedIndex
focal_class.interfaces: implements LookupIndexIF<K, E>
focal_class.class_method_signature: CachedIndex.CachedIndex(LookupIndexIF<K, E> fallback)
focal_class.full_signature: public  CachedIndex(LookupIndexIF<K, E> fallback)
focal_class.identifier: CachedIndex
focal_class.modifiers: public
focal_class.parameters: (LookupIndexIF<K, E> fallback)
focal_class.signature:  CachedIndex(LookupIndexIF<K, E> fallback)
focal_class.class_method_signature: CachedIndex.CachedIndex(LookupIndexIF<K, E> fallback, boolean nulls)
focal_class.full_signature: public  CachedIndex(LookupIndexIF<K, E> fallback, boolean nulls)
focal_class.identifier: CachedIndex
focal_class.modifiers: public
focal_class.parameters: (LookupIndexIF<K, E> fallback, boolean nulls)
focal_class.signature:  CachedIndex(LookupIndexIF<K, E> fallback, boolean nulls)
focal_class.class_method_signature: CachedIndex.CachedIndex(LookupIndexIF<K, E> fallback, int max, int size, boolean nulls)
focal_class.full_signature: public  CachedIndex(LookupIndexIF<K, E> fallback, int max, int size, boolean nulls)
focal_class.identifier: CachedIndex
focal_class.modifiers: public
focal_class.parameters: (LookupIndexIF<K, E> fallback, int max, int size, boolean nulls)
focal_class.signature:  CachedIndex(LookupIndexIF<K, E> fallback, int max, int size, boolean nulls)
focal_class.class_method_signature: CachedIndex.get(K key)
focal_class.full_signature: @Override public E get(K key)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (K key)
focal_class.return: E
focal_class.signature: E get(K key)
focal_class.class_method_signature: CachedIndex.put(K key, E value)
focal_class.full_signature: @Override public E put(K key, E value)
focal_class.identifier: put
focal_class.modifiers: @Override public
focal_class.parameters: (K key, E value)
focal_class.return: E
focal_class.signature: E put(K key, E value)
focal_class.class_method_signature: CachedIndex.remove(K key)
focal_class.full_signature: @Override public E remove(K key)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (K key)
focal_class.return: E
focal_class.signature: E remove(K key)
focal_class.class_method_signature: CachedIndex.getKeyNumber()
focal_class.full_signature: public int getKeyNumber()
focal_class.identifier: getKeyNumber
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getKeyNumber()
focal_class.class_method_signature: CachedIndex.writeReport()
focal_class.full_signature: public void writeReport()
focal_class.identifier: writeReport
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void writeReport()
focal_class.class_method_signature: CachedIndex.addEntry(Entry<K, E> newEntry)
focal_class.full_signature: private Entry<K, E> addEntry(Entry<K, E> newEntry)
focal_class.identifier: addEntry
focal_class.modifiers: private
focal_class.parameters: (Entry<K, E> newEntry)
focal_class.return: Entry<K, E>
focal_class.signature: Entry<K, E> addEntry(Entry<K, E> newEntry)
focal_class.class_method_signature: CachedIndex.prune()
focal_class.full_signature: protected void prune()
focal_class.identifier: prune
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void prune()
focal_class.class_method_signature: CachedIndex.rehash(int size)
focal_class.full_signature: private void rehash(int size)
focal_class.identifier: rehash
focal_class.modifiers: private
focal_class.parameters: (int size)
focal_class.return: void
focal_class.signature: void rehash(int size)
focal_method.body: @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;
    }
focal_method.class_method_signature: CachedIndex.get(K key)
focal_method.full_signature: @Override public E get(K key)
focal_method.identifier: get
focal_method.invocations: hashCode equals get addEntry
focal_method.modifiers: @Override public
focal_method.parameters: (K key)
focal_method.return: E
focal_method.signature: E get(K key)