Skip to content

Commit db69d2a

Browse files
committed
2 parents 502ca3a + 773a6c9 commit db69d2a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/nl/utwente/groove/explore/ExploreResult.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ public GTSFragment toFragment(boolean internal) {
120120
return result;
121121
}
122122

123+
/** Returns the number of states and transitions found during exploration. */
124+
public String getStatistics() {
125+
return "Exploration result: %s states, %s transitions"
126+
.formatted(this.states.size(), this.transitions.size());
127+
}
128+
123129
@Override
124130
public String toString() {
125131
return "Result [states=" + this.states + ", " + "transitions=" + this.transitions

src/main/java/nl/utwente/groove/explore/result/Acceptor.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ public ExploreResult getResult() {
114114

115115
/** Returns a message describing the accepted result. */
116116
public String getMessage() {
117-
String result;
118-
if (this.result.isEmpty()) {
119-
result = "No result states found";
120-
} else {
121-
result = this.result.size() + " result states found: " + this.result;
122-
}
123-
return result;
117+
return this.result.getStatistics();
124118
}
125119
}

0 commit comments

Comments
 (0)