Class MutableInteger


  • public class MutableInteger
    extends Object
    A mutable integer
    Author:
    bratseth
    • Constructor Detail

      • MutableInteger

        public MutableInteger​(int value)
    • Method Detail

      • get

        public int get()
      • set

        public void set​(int value)
      • add

        public int add​(int increment)
        Adds the increment to the current value and returns the resulting value
      • next

        public int next()
        Increments the value by 1 and returns the value of this *before* incrementing
      • subtract

        public int subtract​(int increment)
        Adds the increment to the current value and returns the resulting value