Browse Source

Fixed bug with IndexedSet default constructor not initializing data structures

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

6
prism/src/explicit/IndexedSet.java

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

Loading…
Cancel
Save