de.jstacs.utils
Class ToolBox
java.lang.Object
de.jstacs.utils.ToolBox
public class ToolBox
- extends Object
This class is a collection of methods which might be useful for the programmer.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToolBox
public ToolBox()
parseHashSet2IndexHashtable
public static <K> Hashtable<K,Integer> parseHashSet2IndexHashtable(HashSet<K> set)
- This method converts a
HashSet
in a Hashtable
with unique indices starting at 0.
The indices are derived from the order of the Iterator
of the HashSet
.
- Type Parameters:
K
- the type of the keys- Parameters:
set
- the set of keys
- Returns:
- a
Hashtable
with keys and unique indices starting at 0