rebuild.util.ref
Class RefObject

java.lang.Object
  extended by rebuild.util.ref.RefObject

public final class RefObject
extends java.lang.Object

Reference Object is the same as Object but allows you to set the object without creating a new Object.

Since:
BBX 1.1.0

Constructor Summary
RefObject()
          Create a new RefObject set to the default of null.
RefObject(java.lang.Object value)
          Create a new RefObject using a object.
RefObject(java.lang.Object value, boolean fixed)
          Create a new RefObject using a object.
 
Method Summary
 RefObject clone()
          Create a clone of the current object.
 boolean equals(java.lang.Object obj)
          Returns true if and only if the argument is not null and is a RefObject object that represents the same value as this object.
 int hashCode()
          Returns a hash code for this RefObject object.
 java.lang.Object objectValue()
          Returns The value of this RefObject object.
 RefObject setValue(java.lang.Object value)
          Set the value of this RefObject object with a object.
 java.lang.String toString()
          Returns a String object representing this RefObject's value.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RefObject

public RefObject()
Create a new RefObject set to the default of null.


RefObject

public RefObject(java.lang.Object value)
Create a new RefObject using a object.

Parameters:
value - The object to set this RefObject with.

RefObject

public RefObject(java.lang.Object value,
                 boolean fixed)
Create a new RefObject using a object.

Parameters:
value - The object to set this RefObject with.
fixed - If this item is read only and cannot be modified.
Method Detail

objectValue

public java.lang.Object objectValue()
Returns The value of this RefObject object.

Returns:
The value of this object.

setValue

public RefObject setValue(java.lang.Object value)
Set the value of this RefObject object with a object.

Parameters:
value - The object value to set this object.
Returns:
This object.

equals

public boolean equals(java.lang.Object obj)
Returns true if and only if the argument is not null and is a RefObject object that represents the same value as this object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare with.
Returns:
true if the RefObject objects represent the same value; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this RefObject object.

Overrides:
hashCode in class java.lang.Object
Returns:
The hashcode this object represents.

toString

public java.lang.String toString()
Returns a String object representing this RefObject's value.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.

clone

public RefObject clone()
Create a clone of the current object.

Returns:
A clone of the current RefObject.