From c55eb961ceb24312016d3a46f2c467363e8d0a42 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 3 Jul 2015 08:00:57 +0000 Subject: [PATCH] Code tidy git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10164 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/prism/ResultsCollection.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/prism/src/prism/ResultsCollection.java b/prism/src/prism/ResultsCollection.java index 2d99e95b..9bf30a1d 100644 --- a/prism/src/prism/ResultsCollection.java +++ b/prism/src/prism/ResultsCollection.java @@ -29,6 +29,7 @@ package prism; import java.util.*; + import parser.*; /** @@ -212,7 +213,7 @@ public class ResultsCollection // create header for (i = 0; i < rangingConstants.size(); i++) { - res[i] = ((DefinedConstant) rangingConstants.elementAt(i)).getName(); + res[i] = rangingConstants.elementAt(i).getName(); } res[rangingConstants.size()] = "Result"; @@ -222,7 +223,7 @@ public class ResultsCollection /** * Create ArrayList based representation of the data */ - public ArrayList toArrayList() + public ArrayList toArrayList() { return root.toArrayList(); } @@ -306,7 +307,7 @@ public class ResultsCollection // if there are no variables, override eq separator noVars = true; for (i = 0; i < rangingConstants.size(); i++) { - if (!partial.contains(((DefinedConstant) rangingConstants.elementAt(i)).getName())) { + if (!partial.contains(rangingConstants.elementAt(i).getName())) { noVars = false; break; } @@ -317,7 +318,7 @@ public class ResultsCollection if (header) { first = true; 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 if (!partial.contains(name)) { if (!first) @@ -373,7 +374,7 @@ public class ResultsCollection // store level and create children level = l; - constant = (DefinedConstant) rangingConstants.get(level); + constant = rangingConstants.get(level); n = constant.getNumSteps(); kids = new TreeNode[n]; for (i = 0; i < n; i++) { @@ -434,15 +435,15 @@ public class ResultsCollection /** * Create ArrayList representation of the data */ - public ArrayList toArrayList() + public ArrayList toArrayList() { - ArrayList a = new ArrayList(); + ArrayList a = new ArrayList(); String line[] = new String[rangingConstants.size() + 1]; toArrayListRec(a, line); return a; } - public void toArrayListRec(ArrayList a, String line[]) + public void toArrayListRec(ArrayList a, String line[]) { int i, n; n = constant.getNumSteps(); @@ -665,7 +666,7 @@ public class ResultsCollection return head + eq + val + "\n"; } - public void toArrayListRec(ArrayList a, String line[]) + public void toArrayListRec(ArrayList a, String line[]) { line[rangingConstants.size()] = "" + val; a.add(line.clone());