Class MutableInt


  • public class MutableInt
    extends java.lang.Object
    Mutable int
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int value  
    • Constructor Summary

      Constructors 
      Constructor Description
      MutableInt()  
      MutableInt​(int value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get()
      Get current sequence value
      int incrementAndGet()
      Increment sequence and get new value
      void set​(int value)
      Set new sequence value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        private int value
    • Constructor Detail

      • MutableInt

        public MutableInt()
      • MutableInt

        public MutableInt​(int value)
    • Method Detail

      • set

        public void set​(int value)
        Set new sequence value
        Parameters:
        value - new value
      • get

        public int get()
        Get current sequence value
        Returns:
        value
      • incrementAndGet

        public int incrementAndGet()
        Increment sequence and get new value
        Returns:
        new value