diff options
author | 2021-08-01 23:15:14 +0200 | |
---|---|---|
committer | 2021-08-01 23:15:14 +0200 | |
commit | 5fcfaa77cb53a4516444bd43ce7c303c8f96020e (patch) | |
tree | e854882aa2eb0883aa649b7a525d1af70823d93d /model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java | |
parent | Model representation is outdated. (diff) | |
download | refinery-5fcfaa77cb53a4516444bd43ce7c303c8f96020e.tar.gz refinery-5fcfaa77cb53a4516444bd43ce7c303c8f96020e.tar.zst refinery-5fcfaa77cb53a4516444bd43ce7c303c8f96020e.zip |
Sonar fixes
Diffstat (limited to 'model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java index a18d540d..97fbcd8f 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/map/internal/MapCursor.java | |||
@@ -10,8 +10,8 @@ import org.eclipse.viatra.solver.data.map.VersionedMap; | |||
10 | 10 | ||
11 | public class MapCursor<K,V> implements Cursor<K,V> { | 11 | public class MapCursor<K,V> implements Cursor<K,V> { |
12 | // Constants | 12 | // Constants |
13 | static int IndexStart = -1; | 13 | static final int INDEX_START = -1; |
14 | static int IndexFinish = -2; | 14 | static final int INDEX_FINISH = -2; |
15 | 15 | ||
16 | // Tree stack | 16 | // Tree stack |
17 | ArrayDeque<Node<K,V>> nodeStack; | 17 | ArrayDeque<Node<K,V>> nodeStack; |
@@ -33,10 +33,10 @@ public class MapCursor<K,V> implements Cursor<K,V> { | |||
33 | this.nodeIndexStack = new ArrayDeque<>(); | 33 | this.nodeIndexStack = new ArrayDeque<>(); |
34 | if(root != null) { | 34 | if(root != null) { |
35 | this.nodeStack.add(root); | 35 | this.nodeStack.add(root); |
36 | this.nodeIndexStack.push(IndexStart); | 36 | this.nodeIndexStack.push(INDEX_START); |
37 | } | 37 | } |
38 | 38 | ||
39 | this.dataIndex = IndexStart; | 39 | this.dataIndex = INDEX_START; |
40 | 40 | ||
41 | // Initializing cache | 41 | // Initializing cache |
42 | this.key = null; | 42 | this.key = null; |
@@ -75,7 +75,7 @@ public class MapCursor<K,V> implements Cursor<K,V> { | |||
75 | public boolean skipCurrentNode() { | 75 | public boolean skipCurrentNode() { |
76 | nodeStack.pop(); | 76 | nodeStack.pop(); |
77 | nodeIndexStack.pop(); | 77 | nodeIndexStack.pop(); |
78 | dataIndex = IndexFinish; | 78 | dataIndex = INDEX_FINISH; |
79 | return move(); | 79 | return move(); |
80 | } | 80 | } |
81 | @Override | 81 | @Override |