Class MutableLong

    • Field Detail

      • m_lValue

        protected long m_lValue
        The value.
    • Constructor Detail

      • MutableLong

        public MutableLong()
        Construct a MutableLong with a zero initial value.
      • MutableLong

        public MutableLong​(long lValue)
        Construct a MutableLong with the specified value.
        Parameters:
        lValue - the initial value
    • Method Detail

      • set

        public MutableLong set​(long lValue)
        Update the value
        Parameters:
        lValue - the new value
        Returns:
        this object
      • get

        public long get()
        Return the current value.
        Returns:
        the value
      • incrementAndGet

        public long incrementAndGet()
        Increment the long and return the new value.
        Returns:
        the new value
      • decrementAndGet

        public long decrementAndGet()
        Decrement the long and return the new value.
        Returns:
        the new value
      • createThreadLocal

        public static ThreadLocal<MutableLong> createThreadLocal()
        Return a ThreadLocal of MutableLong.
        Returns:
        a ThreadLocal of MutableLong
      • intValue

        public int intValue()
        Specified by:
        intValue in class Number
      • longValue

        public long longValue()
        Specified by:
        longValue in class Number
      • floatValue

        public float floatValue()
        Specified by:
        floatValue in class Number
      • doubleValue

        public double doubleValue()
        Specified by:
        doubleValue in class Number
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object