mro.util.doublehashmap
Class GenericOrderedDoubleHashMap<F,S,V>
java.lang.Object
mro.util.doublehashmap.GenericDoubleHashMap<F,S,V>
mro.util.doublehashmap.GenericOrderedDoubleHashMap<F,S,V>
public class GenericOrderedDoubleHashMap<F,S,V>
- extends GenericDoubleHashMap<F,S,V>
A DoubleHashMap has two indexes.
There is only one copy of each index value.
Methods inherited from class mro.util.doublehashmap.GenericDoubleHashMap |
get, keySetOfSecondIndexForElementInFirst, putIntoFirstMap, putIntoSecondMap, remove, removeAllFirst, removeAllSecond, size, sizeOfFirstIndex, sizeOfSecondIndex, sizeOfSecondIndexForElementInFirst, values, valuesForFirstIndex, valuesForSecondIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
firstIndexOrderVector
private java.util.Vector<F> firstIndexOrderVector
secondIndexOrderVector
private java.util.Vector<S> secondIndexOrderVector
GenericOrderedDoubleHashMap
public GenericOrderedDoubleHashMap()
GenericOrderedDoubleHashMap
public GenericOrderedDoubleHashMap(java.lang.Class<F> fClass,
java.lang.Class<S> sClass,
java.lang.Class<V> vClass)
- Constructor. Use this when the first and second index
has the same class as in these cases the invert()-method
becomes faster.
GenericOrderedDoubleHashMap
public GenericOrderedDoubleHashMap(GenericOrderedDoubleHashMap<F,S,V> map)
GenericOrderedDoubleHashMap
public GenericOrderedDoubleHashMap(GenericDoubleHashMap<F,S,V> map)
put
public void put(F first,
S second,
V value)
- Adds a Object "value" indexed with the Object:s
"first" and "second". The index objects are added in order.
- Overrides:
put
in class GenericDoubleHashMap<F,S,V>
- Parameters:
first
- second
- value
-
invert
public GenericOrderedDoubleHashMap<S,F,V> invert()
- Description copied from class:
GenericDoubleHashMap
- Inverts the mapping, so the fist index becomes the second.
Makes a copy!
- Overrides:
invert
in class GenericDoubleHashMap<F,S,V>
sortFirstIndex
public void sortFirstIndex(java.util.Comparator<? super F> comp)
sortSecondIndex
public void sortSecondIndex(java.util.Comparator<? super S> comp)
getFirstIndexOrderVector
public java.util.Vector<F> getFirstIndexOrderVector()
getSecondIndexOrderVector
public java.util.Vector<S> getSecondIndexOrderVector()
print
public void print()