Browse Source

Added constructor to the IndexedSet with a comparator

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7221 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Mateusz Ujma 13 years ago
parent
commit
67efd14c6d
  1. 10
      prism/src/explicit/IndexedSet.java

10
prism/src/explicit/IndexedSet.java

@ -39,13 +39,19 @@ public class IndexedSet<T> implements StateStorage<T>
public IndexedSet()
{
this(false);
indexOfLastAdd = -1;
}
public IndexedSet(boolean sorted)
{
this();
set = sorted ? new TreeMap<T, Integer>() : new HashMap<T, Integer>();
indexOfLastAdd = -1;
}
public IndexedSet(Comparator<T> comparator)
{
this();
set = new TreeMap<T, Integer>(comparator);
}
@Override

Loading…
Cancel
Save