diff options
author | 2021-08-03 18:42:39 +0900 | |
---|---|---|
committer | 2021-08-06 19:32:38 +0900 | |
commit | be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 (patch) | |
tree | 1f3f1a96251ac4f655c8a96fc33d5d4ee779cd06 /rba.tool.core/src/rba/tool/core/util/SortResult.java | |
parent | 71ca7c6cab863767ef30c8bd05b2bbfda8731cb5 (diff) |
Initial commit
Bug-AGL: SPEC-4033
Signed-off-by: Kenji Hosokawa <khosokawa@jp.adit-jv.com>
Diffstat (limited to 'rba.tool.core/src/rba/tool/core/util/SortResult.java')
-rw-r--r-- | rba.tool.core/src/rba/tool/core/util/SortResult.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/rba.tool.core/src/rba/tool/core/util/SortResult.java b/rba.tool.core/src/rba/tool/core/util/SortResult.java new file mode 100644 index 0000000..838a325 --- /dev/null +++ b/rba.tool.core/src/rba/tool/core/util/SortResult.java @@ -0,0 +1,38 @@ +package rba.tool.core.util; + +import java.util.ArrayList; +import java.util.List; + +import rba.core.RuleObject; + +public class SortResult<T extends RuleObject> { + private List<SortResultSet<T>> sortResults = new ArrayList<SortResultSet<T>>(); + + private boolean isUnsat; + + public List<SortResultSet<T>> getSortResults() { + return sortResults; + } + + public boolean addSortResult(SortResultSet<T> sortResult) { + return sortResults.add(sortResult); + } + + public SortResultSet<T> getSortResultSet(RuleObject obj) { + for (SortResultSet<T> sortResult : sortResults) { + T element = sortResult.getElement(); + if (element.equals(obj)) { + return sortResult; + } + } + return null; + } + + public boolean isUnsat() { + return isUnsat; + } + + public void setUnsat(boolean isUnsat) { + this.isUnsat = isUnsat; + } +} |