org.processmining.framework.util
Class MethodsToConvertDataStructures

java.lang.Object
  extended by org.processmining.framework.util.MethodsToConvertDataStructures

public class MethodsToConvertDataStructures
extends java.lang.Object

Title:

Description: This class has various methods to convert between classes or data types in Java.

Copyright: Copyright (c) 2004

Company:

Version:
1.0
Author:
not attributable

Constructor Summary
MethodsToConvertDataStructures()
           
 
Method Summary
static java.util.TreeSet getSetUnion(java.util.HashSet hashSet)
          This method build the unions set of all TreeSets that are at a given HashSet.
static java.util.HashMap toHashMap(java.util.Iterator i)
          Converts an Iterator to a HashMap.
static java.util.Hashtable toHashtable(java.util.Iterator i)
          Converts an Iterator to a Hashtable.
static java.util.TreeSet toTreeSet(java.util.Iterator iterator)
          Converts an Iterator to a TreeSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodsToConvertDataStructures

public MethodsToConvertDataStructures()
Method Detail

toTreeSet

public static java.util.TreeSet toTreeSet(java.util.Iterator iterator)
Converts an Iterator to a TreeSet.

Parameters:
iterator - to be converted
Returns:
TreeSet. If Iterator equals null, the returned TreeSet is also null.

toHashtable

public static java.util.Hashtable toHashtable(java.util.Iterator i)
                                       throws java.lang.NullPointerException
Converts an Iterator to a Hashtable.

Parameters:
i - iterator to convert.
Returns:
Hashtable where:
- Keys = elements in i
- Values = an Integer equals -1.
Throws:
java.lang.NullPointerException - if i equals null.

toHashMap

public static java.util.HashMap toHashMap(java.util.Iterator i)
                                   throws java.lang.NullPointerException
Converts an Iterator to a HashMap.

Parameters:
i - iterator to convert.
Returns:
Hashtable where:
- Keys = elements in i
- Values = an Integer equals -1.
Throws:
java.lang.NullPointerException - if i equals null.

getSetUnion

public static java.util.TreeSet getSetUnion(java.util.HashSet hashSet)
This method build the unions set of all TreeSets that are at a given HashSet.

Parameters:
hashSet - HashSet that contains TreeSets.
Returns:
the union set.