jdbm.htree
Class HTreeSecondaryMap<A,K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by jdbm.helper.AbstractPrimaryMap<K,V>
          extended by jdbm.htree.HTreeMap<A,java.lang.Iterable<K>>
              extended by jdbm.htree.HTreeSecondaryMap<A,K,V>
All Implemented Interfaces:
java.util.Map<A,java.lang.Iterable<K>>, JdbmBase<A,java.lang.Iterable<K>>, PrimaryHashMap<A,java.lang.Iterable<K>>, PrimaryMap<A,java.lang.Iterable<K>>, SecondaryHashMap<A,K,V>

public class HTreeSecondaryMap<A,K,V>
extends HTreeMap<A,java.lang.Iterable<K>>
implements SecondaryHashMap<A,K,V>


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
HTreeSecondaryMap(HTree<A,java.lang.Iterable<K>> tree, JdbmBase<K,V> b)
           
 
Method Summary
 V getPrimaryValue(K k)
          Convert primary key to primary value.
 java.lang.Iterable<V> getPrimaryValues(A a)
          Returns values from primary map which are matching given secondary key
 
Methods inherited from class jdbm.htree.HTreeMap
addRecordListener, clear, containsKey, entrySet, get, getRecordManager, getTree, put, remove, removeRecordListener
 
Methods inherited from class jdbm.helper.AbstractPrimaryMap
find, inverseHashView, secondaryHashMap, secondaryHashMap, secondaryHashMapManyToOne, secondaryHashMapManyToOne, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne
 
Methods inherited from class java.util.AbstractMap
containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from interface jdbm.PrimaryMap
inverseHashView, secondaryHashMap, secondaryHashMap, secondaryHashMapManyToOne, secondaryHashMapManyToOne, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne
 
Methods inherited from interface jdbm.helper.JdbmBase
find
 

Constructor Detail

HTreeSecondaryMap

public HTreeSecondaryMap(HTree<A,java.lang.Iterable<K>> tree,
                         JdbmBase<K,V> b)
Method Detail

getPrimaryValue

public V getPrimaryValue(K k)
Description copied from interface: SecondaryHashMap
Convert primary key to primary value. This will query primary table and returns result, it is little shortcut.

Specified by:
getPrimaryValue in interface SecondaryHashMap<A,K,V>
Parameters:
k - primary key
Returns:
value from primary table

getPrimaryValues

public java.lang.Iterable<V> getPrimaryValues(A a)
Description copied from interface: SecondaryHashMap
Returns values from primary map which are matching given secondary key

Specified by:
getPrimaryValues in interface SecondaryHashMap<A,K,V>
Returns:
Iterable over values, this never returns null.


Cees de Groot (C) 2000. All rights reserved http://jdbm.sourceforge.net