com.sun.electric.database.geometry
Class GenMath.MutableInteger

java.lang.Object
  extended by com.sun.electric.database.geometry.GenMath.MutableInteger
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
GenMath

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

Class to define an Integer-like object that can be modified.

See Also:
Serialized Form

Constructor Summary
GenMath.MutableInteger(int value)
          Constructor creates a MutableInteger object with an initial value.
 
Method Summary
 void addValue(int value)
          Method to add the value of this MutableInteger.
 void decrement()
          Method to increment this MutableInteger by 1.
 void increment()
          Method to increment this MutableInteger by 1.
 int intValue()
          Method to return the value of this MutableInteger.
 void setValue(int value)
          Method to change the value of this MutableInteger.
 java.lang.String toString()
          Returns a printable version of this MutableInteger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenMath.MutableInteger

public GenMath.MutableInteger(int value)
Constructor creates a MutableInteger object with an initial value.

Parameters:
value - the initial value.
Method Detail

setValue

public void setValue(int value)
Method to change the value of this MutableInteger.

Parameters:
value - the new value.

addValue

public void addValue(int value)
Method to add the value of this MutableInteger.

Parameters:
value - the value to add.

increment

public void increment()
Method to increment this MutableInteger by 1.


decrement

public void decrement()
Method to increment this MutableInteger by 1.


intValue

public int intValue()
Method to return the value of this MutableInteger.

Returns:
the current value of this MutableInteger.

toString

public java.lang.String toString()
Returns a printable version of this MutableInteger.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this MutableInteger.