org.rutil.collection.map
Class AbstractIndexedMapIndexer<K,V>

java.lang.Object
  extended by org.rutil.collection.map.AbstractIndexedMapIndexer<K,V>
All Implemented Interfaces:
IndexedMapIndexer<K,V>
Direct Known Subclasses:
ComparableIndexedMapIndexer

public abstract class AbstractIndexedMapIndexer<K,V>
extends java.lang.Object
implements IndexedMapIndexer<K,V>

Author:
mohan

Constructor Summary
AbstractIndexedMapIndexer(boolean useKeyIndex)
           
 
Method Summary
protected abstract  int doGetKeyIndex(java.util.List<K> keys, K key)
           
protected abstract  int doGetValueIndex(java.util.List<V> values, V value)
           
protected  int find(java.util.List values, java.lang.Object value)
           
 int getIndex(java.util.List<K> keys, java.util.List<V> values, K key, V value)
           
 int getKeyIndex(java.util.List<K> keys, K key)
           
 int getValueIndex(java.util.List<V> values, V value)
           
 boolean isIndexedByKey()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIndexedMapIndexer

public AbstractIndexedMapIndexer(boolean useKeyIndex)
Method Detail

isIndexedByKey

public boolean isIndexedByKey()
Specified by:
isIndexedByKey in interface IndexedMapIndexer<K,V>

getIndex

public int getIndex(java.util.List<K> keys,
                    java.util.List<V> values,
                    K key,
                    V value)
Specified by:
getIndex in interface IndexedMapIndexer<K,V>

getKeyIndex

public int getKeyIndex(java.util.List<K> keys,
                       K key)
Specified by:
getKeyIndex in interface IndexedMapIndexer<K,V>

doGetKeyIndex

protected abstract int doGetKeyIndex(java.util.List<K> keys,
                                     K key)

getValueIndex

public int getValueIndex(java.util.List<V> values,
                         V value)
Specified by:
getValueIndex in interface IndexedMapIndexer<K,V>

doGetValueIndex

protected abstract int doGetValueIndex(java.util.List<V> values,
                                       V value)

find

protected int find(java.util.List values,
                   java.lang.Object value)