|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.util.ObjectReference<E>
public class ObjectReference<E>
An ObjectReference points to an object and can be updated
behind-the-scenes to point to another object without the user noticing.
The updating is done using union-find techniques. Currently, only path
compression is done. Union-by-rank should be added in the future.
The implementation is not synchronized.
| Constructor Summary | |
|---|---|
ObjectReference(E obj)
Creates a new ObjectReference pointing to the specified
object. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Two ObjectReferences are equal if and only if the objects
that they point to are equal. |
E |
get()
Returns the object pointed to. |
int |
hashCode()
Returns the hash code of the object pointed to. |
void |
move(ObjectReference<E> ref)
Lets this ObjectReference point to the same actual object
as the specified ObjectReference. |
String |
toString()
Returns the result of invoking the toString method on the
object pointed to. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectReference(E obj)
ObjectReference pointing to the specified
object.
| Method Detail |
|---|
public E get()
public void move(ObjectReference<E> ref)
ObjectReference point to the same actual object
as the specified ObjectReference.
public boolean equals(Object o)
ObjectReferences are equal if and only if the objects
that they point to are equal.
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString method on the
object pointed to.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||