visad
Class DataReferenceImpl

java.lang.Object
  extended by visad.ThingReferenceImpl
      extended by visad.DataReferenceImpl
All Implemented Interfaces:
DataReference, ThingReference

public class DataReferenceImpl
extends ThingReferenceImpl
implements DataReference

DataReferenceImpl is a local implementation of DataReference.

DataReferenceImpl is not Serializable and should not be copied between JVMs.


Constructor Summary
DataReferenceImpl(String name)
          Constructs from a name for the instance.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether or not this instance is equal to an object
 Data getData()
           
 MathType getType()
          this is more efficient than getData().getType() for RemoteDataReferences
 void setData(Data d)
          Sets the Data object to which this instance refers.
 String toString()
           
 
Methods inherited from class visad.ThingReferenceImpl
acknowledgeThingChanged, adaptedAcknowledgeThingChanged, adaptedPeekThingChanged, addThingChangedListener, findThingChangedLink, getName, getThing, getTick, incTick, peekThingChanged, removeThingChangedListener, setThing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface visad.ThingReference
acknowledgeThingChanged, addThingChangedListener, getName, getThing, getTick, incTick, peekThingChanged, removeThingChangedListener, setThing
 

Constructor Detail

DataReferenceImpl

public DataReferenceImpl(String name)
                  throws VisADException
Constructs from a name for the instance.

Parameters:
name - The name for this instance.
Throws:
VisADException - if the name is null.
Method Detail

getData

public Data getData()
Specified by:
getData in interface DataReference
Returns:
referenced Data object, or null if none
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getType

public MathType getType()
                 throws VisADException,
                        RemoteException
this is more efficient than getData().getType() for RemoteDataReferences

Specified by:
getType in interface DataReference
Returns:
the MathType of referenced Data object, or null if none;
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

setData

public void setData(Data d)
             throws VisADException,
                    RemoteException
Sets the Data object to which this instance refers.

Specified by:
setData in interface DataReference
Parameters:
d - The data object.
Throws:
ReferenceException - if the data object is null.
RemoteVisADException - if the data object is a RemoteData.
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

equals

public boolean equals(Object obj)
Indicates whether or not this instance is equal to an object

Overrides:
equals in class ThingReferenceImpl
Parameters:
obj - the object in question.
Returns:
true if and only if this instance equals o.

toString

public String toString()
Overrides:
toString in class ThingReferenceImpl
Returns:
String representation of this