aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <semerath@mit.bme.hu>2023-02-05 02:32:27 +0100
committerLibravatar OszkarSemerath <semerath@mit.bme.hu>2023-02-05 02:32:27 +0100
commit80a08f099b220fe7aca45cb6ef30da02be0087ca (patch)
tree7c03c01bdcfc21ebd748dc177ff46d35499d20b3 /subprojects
parentCursor comparison bugfix with empty cursors (and null values). (diff)
downloadrefinery-80a08f099b220fe7aca45cb6ef30da02be0087ca.tar.gz
refinery-80a08f099b220fe7aca45cb6ef30da02be0087ca.tar.zst
refinery-80a08f099b220fe7aca45cb6ef30da02be0087ca.zip
fixup! Performance improvements by replacing hash depth calculation with shifting, improving code quality. + formatting
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/store/src/main/java/tools/refinery/store/map/internal/VersionedMapImpl.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/map/internal/VersionedMapImpl.java b/subprojects/store/src/main/java/tools/refinery/store/map/internal/VersionedMapImpl.java
index 57256472..674ffc47 100644
--- a/subprojects/store/src/main/java/tools/refinery/store/map/internal/VersionedMapImpl.java
+++ b/subprojects/store/src/main/java/tools/refinery/store/map/internal/VersionedMapImpl.java
@@ -131,28 +131,6 @@ public class VersionedMapImpl<K, V> implements VersionedMap<K, V> {
131 root = this.store.revert(state); 131 root = this.store.revert(state);
132 } 132 }
133 133
134 @Override
135 public int hashCode() {
136 final int prime = 31;
137 int result = 1;
138 result = prime * result + ((root == null) ? 0 : root.hashCode());
139 return result;
140 }
141
142 @Override
143 public boolean equals(Object obj) {
144 if (this == obj)
145 return true;
146 if (obj == null)
147 return false;
148 if (getClass() != obj.getClass())
149 return false;
150 VersionedMapImpl<?, ?> other = (VersionedMapImpl<?, ?>) obj;
151 if (root == null) {
152 return other.root == null;
153 } else return root.equals(other.root);
154 }
155
156 public String prettyPrint() { 134 public String prettyPrint() {
157 if (this.root != null) { 135 if (this.root != null) {
158 StringBuilder s = new StringBuilder(); 136 StringBuilder s = new StringBuilder();