Browse Source

Code tidy

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10164 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 11 years ago
parent
commit
c55eb961ce
  1. 19
      prism/src/prism/ResultsCollection.java

19
prism/src/prism/ResultsCollection.java

@ -29,6 +29,7 @@
package prism; package prism;
import java.util.*; import java.util.*;
import parser.*; import parser.*;
/** /**
@ -212,7 +213,7 @@ public class ResultsCollection
// create header // create header
for (i = 0; i < rangingConstants.size(); i++) { for (i = 0; i < rangingConstants.size(); i++) {
res[i] = ((DefinedConstant) rangingConstants.elementAt(i)).getName();
res[i] = rangingConstants.elementAt(i).getName();
} }
res[rangingConstants.size()] = "Result"; res[rangingConstants.size()] = "Result";
@ -222,7 +223,7 @@ public class ResultsCollection
/** /**
* Create ArrayList based representation of the data * Create ArrayList based representation of the data
*/ */
public ArrayList toArrayList()
public ArrayList<String[]> toArrayList()
{ {
return root.toArrayList(); return root.toArrayList();
} }
@ -306,7 +307,7 @@ public class ResultsCollection
// if there are no variables, override eq separator // if there are no variables, override eq separator
noVars = true; noVars = true;
for (i = 0; i < rangingConstants.size(); i++) { for (i = 0; i < rangingConstants.size(); i++) {
if (!partial.contains(((DefinedConstant) rangingConstants.elementAt(i)).getName())) {
if (!partial.contains(rangingConstants.elementAt(i).getName())) {
noVars = false; noVars = false;
break; break;
} }
@ -317,7 +318,7 @@ public class ResultsCollection
if (header) { if (header) {
first = true; first = true;
for (i = 0; i < rangingConstants.size(); i++) { for (i = 0; i < rangingConstants.size(); i++) {
name = ((DefinedConstant) rangingConstants.elementAt(i)).getName();
name = rangingConstants.elementAt(i).getName();
// only print constants for which we haven't been given values // only print constants for which we haven't been given values
if (!partial.contains(name)) { if (!partial.contains(name)) {
if (!first) if (!first)
@ -373,7 +374,7 @@ public class ResultsCollection
// store level and create children // store level and create children
level = l; level = l;
constant = (DefinedConstant) rangingConstants.get(level);
constant = rangingConstants.get(level);
n = constant.getNumSteps(); n = constant.getNumSteps();
kids = new TreeNode[n]; kids = new TreeNode[n];
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
@ -434,15 +435,15 @@ public class ResultsCollection
/** /**
* Create ArrayList representation of the data * Create ArrayList representation of the data
*/ */
public ArrayList toArrayList()
public ArrayList<String[]> toArrayList()
{ {
ArrayList a = new ArrayList();
ArrayList<String[]> a = new ArrayList<String[]>();
String line[] = new String[rangingConstants.size() + 1]; String line[] = new String[rangingConstants.size() + 1];
toArrayListRec(a, line); toArrayListRec(a, line);
return a; return a;
} }
public void toArrayListRec(ArrayList a, String line[])
public void toArrayListRec(ArrayList<String[]> a, String line[])
{ {
int i, n; int i, n;
n = constant.getNumSteps(); n = constant.getNumSteps();
@ -665,7 +666,7 @@ public class ResultsCollection
return head + eq + val + "\n"; return head + eq + val + "\n";
} }
public void toArrayListRec(ArrayList a, String line[])
public void toArrayListRec(ArrayList<String[]> a, String line[])
{ {
line[rangingConstants.size()] = "" + val; line[rangingConstants.size()] = "" + val;
a.add(line.clone()); a.add(line.clone());

Loading…
Cancel
Save