Class MutableDelta

java.lang.Object
org.javimmutable.collections.common.MutableDelta
All Implemented Interfaces:
java.util.function.Function<Integer,Integer>, Func1<Integer,Integer>

public class MutableDelta extends Object implements Func1<Integer,Integer>
Mutable object for tracking changes from zero.
  • Constructor Details

    • MutableDelta

      public MutableDelta()
  • Method Details

    • add

      public void add(int increment)
    • subtract

      public void subtract(int decrement)
    • getValue

      public int getValue()
    • apply

      public Integer apply(Integer callerValue)
      Specified by:
      apply in interface Func1<Integer,Integer>
      Specified by:
      apply in interface java.util.function.Function<Integer,Integer>