edu.indiana.util
Class MutableInteger

java.lang.Object
  extended by edu.indiana.util.MutableInteger
All Implemented Interfaces:
java.io.Serializable

public class MutableInteger
extends java.lang.Object
implements java.io.Serializable

This class is like the Integer class, except that it is mutable.

See Also:
Serialized Form

Constructor Summary
protected MutableInteger()
           
  MutableInteger(int value)
          Creates new MutableInteger
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 int intValue()
          Get the int associated with this MutableInteger.
 void relativeChange(int delta)
          Change the value associated with this object by a specified amount.
 java.lang.String toString()
          Get a String representation of this MutableInteger.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableInteger

protected MutableInteger()

MutableInteger

public MutableInteger(int value)
Creates new MutableInteger

Method Detail

relativeChange

public void relativeChange(int delta)
Change the value associated with this object by a specified amount.


intValue

public int intValue()
Get the int associated with this MutableInteger.


toString

public java.lang.String toString()
Get a String representation of this MutableInteger.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object