shared
Class IntRef

java.lang.Object
  |
  +--shared.IntRef

public class IntRef
extends java.lang.Object

This is an integer wrapper, made because the JDK1.2.2 Integer wrapper doesn't allow changes to be made to the integer value.


Field Summary
 int value
          The value of this wrapper.
 
Constructor Summary
IntRef()
          Constructor.
IntRef(int v)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object rhs)
          Compares this IntRef object to the specified IntRef object.
 java.lang.String toString()
          Converts this wrapper to a String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public int value
The value of this wrapper.
Constructor Detail

IntRef

public IntRef()
Constructor. Sets value to 0 by default.

IntRef

public IntRef(int v)
Constructor.
Parameters:
v - The value to be stored in this wrapper.
Method Detail

toString

public java.lang.String toString()
Converts this wrapper to a String.
Overrides:
toString in class java.lang.Object
Returns:
A String representation of the value stored in this wrapper.

equals

public boolean equals(java.lang.Object rhs)
Compares this IntRef object to the specified IntRef object.
Overrides:
equals in class java.lang.Object
Parameters:
rhs - The Object to be compared to.
Returns:
True if the values are equal, false otherwise.