nl.tudelft.simulation.event.ref
Class Reference<T>

java.lang.Object
  extended by nl.tudelft.simulation.event.ref.Reference<T>
Type Parameters:
T -
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
StrongReference, WeakReference

public abstract class Reference<T>
extends java.lang.Object
implements java.io.Serializable

A Reference interface defining the indirect pointer access to an object.

(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

Since:
1.5
Version:
$Revision: 1.7 $ $Date: 2005/08/04 12:08:33 $
Author:
Peter Jacobs
See Also:
Reference, Serialized Form

Constructor Summary
Reference()
           
 
Method Summary
abstract  T get()
          Returns this reference object's referent.
protected abstract  void set(T 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

Reference

public Reference()
Method Detail

get

public abstract T get()
Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.

Returns:
The object to which this reference refers, or null if this reference object has been cleared

set

protected abstract void set(T value)
sets the value of the reference

Parameters:
value - the value to set


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.