summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/esodata/PushdownMap.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2020-11-11 12:23:57 -0400
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2020-11-11 12:23:57 -0400
commit0805c271505340c1da60a1b8920560bae73f21a9 (patch)
tree2703917145a8e8aee7bd4ad55634c65ed688dda6 /src/main/java/bjc/esodata/PushdownMap.java
parentd3239ea7b6945d449c0361416ab54fec6f9643e6 (diff)
parentc56a10f7c943dd9e9f04854395638babfaba6529 (diff)
Merge branch 'master' of https://github.com/bculkin2442/esodata
Diffstat (limited to 'src/main/java/bjc/esodata/PushdownMap.java')
-rw-r--r--src/main/java/bjc/esodata/PushdownMap.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/main/java/bjc/esodata/PushdownMap.java b/src/main/java/bjc/esodata/PushdownMap.java
index 54ae939..a10c149 100644
--- a/src/main/java/bjc/esodata/PushdownMap.java
+++ b/src/main/java/bjc/esodata/PushdownMap.java
@@ -113,9 +113,7 @@ public class PushdownMap<KeyType, ValueType> implements IMap<KeyType, ValueType>
public ValueType remove(final KeyType key) {
final Stack<ValueType> stk = backing.get(key);
- if (stk.size() > 1) {
- return stk.pop();
- }
+ if (stk.size() > 1) return stk.pop();
return backing.remove(key).top();
}
@@ -137,20 +135,17 @@ public class PushdownMap<KeyType, ValueType> implements IMap<KeyType, ValueType>
@Override
public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof PushdownMap<?, ?>))
- return false;
+ if (this == obj) return true;
+ if (obj == null) return false;
+ if (!(obj instanceof PushdownMap<?, ?>)) return false;
final PushdownMap<?, ?> other = (PushdownMap<?, ?>) obj;
if (backing == null) {
- if (other.backing != null)
- return false;
- } else if (!backing.equals(other.backing))
+ if (other.backing != null) return false;
+ } else if (!backing.equals(other.backing)) {
return false;
+ }
return true;
}