|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.event.ref.Reference
nl.tudelft.simulation.event.ref.StrongReference
public class StrongReference
A StrongReference class represents a normal pointer relation to a reference.
This class is created to complete the java.lang.ref package. This class
ensures that references can be used without casting to either an object or a
reference. Strong references are not created to be cleaned by the garbage
collector. Since they represent normal pointer relations, they are the only
ones which might be serialized. This class therefore implements
java.io.Serializable
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/event
License of use: Lesser
General Public License (LGPL) , no warranty
Constructor Summary | |
---|---|
StrongReference(Object referent)
Creates a new strong reference that refers to the given object. |
Method Summary | |
---|---|
Object |
get()
Returns this reference object's referent. |
protected void |
set(Object value)
sets the value of the reference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrongReference(Object referent)
referent
- object the new strong reference will refer toMethod Detail |
---|
public Object get()
Reference
null
.
get
in class Reference
null
if this reference object has been clearedReference.get()
protected void set(Object value)
Reference
set
in class Reference
Reference.set(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |