summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/lang
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-06-18 12:39:21 +0200
committerJon Bratseth <bratseth@verizonmedia.com>2019-06-18 12:39:21 +0200
commitdf72032ccaa6f2a132bba6a7c47b9885479b09de (patch)
tree5ccc1d3f7046fa4e24814534c7787c9e1b7fcde7 /vespajlib/src/main/java/com/yahoo/lang
parenta62b4b191fcdde36066e9ea362e4ea2dd4fd0114 (diff)
Deserialize dense form
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/lang')
-rw-r--r--vespajlib/src/main/java/com/yahoo/lang/MutableInteger.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/lang/MutableInteger.java b/vespajlib/src/main/java/com/yahoo/lang/MutableInteger.java
index a988a3f6fa2..e2da62b6098 100644
--- a/vespajlib/src/main/java/com/yahoo/lang/MutableInteger.java
+++ b/vespajlib/src/main/java/com/yahoo/lang/MutableInteger.java
@@ -24,6 +24,12 @@ public class MutableInteger {
return value;
}
+ /** Increments the value by 1 and returns the value of this *before* incrementing */
+ public int next() {
+ value++;
+ return value - 1;
+ }
+
/** Adds the increment to the current value and returns the resulting value */
public int subtract(int increment) {
value -= increment;