Class MutableInteger

  • All Implemented Interfaces:
    java.io.Serializable

    public class MutableInteger
    extends java.lang.Number
    An mutable integer
    Version:
    $Id: MutableInteger.java,v 1.3 2004/09/03 13:24:14 thlee Exp $ $Name: $
    Author:
    TiongHiang Lee (thlee@onemindsoft.org)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int _value
      the integer value *
    • Constructor Summary

      Constructors 
      Constructor Description
      MutableInteger​(int l)
    • Field Detail

      • _value

        private int _value
        the integer value *
    • Constructor Detail

      • MutableInteger

        public MutableInteger​(int l)
        Parameters:
        l - the int value
    • Method Detail

      • set

        public final void set​(int l)
        Set the value
        Parameters:
        l - the int value
      • byteValue

        public final byte byteValue()
        Overrides:
        byteValue in class java.lang.Number
      • doubleValue

        public final double doubleValue()
        Specified by:
        doubleValue in class java.lang.Number
      • floatValue

        public final float floatValue()
        Specified by:
        floatValue in class java.lang.Number
      • intValue

        public final int intValue()
        Specified by:
        intValue in class java.lang.Number
      • longValue

        public final long longValue()
        Specified by:
        longValue in class java.lang.Number
      • shortValue

        public final short shortValue()
        Overrides:
        shortValue in class java.lang.Number
      • inc

        public void inc​(int i)
        increase by i
        Parameters:
        i - the value to increase
      • dec

        public void dec​(int i)
        decrease by i
        Parameters:
        i - the value to decrease
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object