edu.berkeley.guir.ptk.data
Class Data

java.lang.Object
  extended byedu.berkeley.guir.ptk.data.Data
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DataFile, DataNumber, DataObject, DataRange, DataString, DataSwitch

public abstract class Data
extends java.lang.Object
implements java.io.Serializable

Contains a single piece of data. Used to wrap data for use in the PTK. All Data objects have an id field. This is set by the creator of the Data and indentifies it. It is typically some string that describes the data, such as "sound" or "temperature". Some data ids are already specified in PTKConstants.

Author:
tmatthew Created: Feb 18, 2003
See Also:
Serialized Form

Field Summary
 java.lang.String id
          Identifies the data (i.e., "microphone1" or "temperature").
 
Constructor Summary
protected Data()
           
 
Method Summary
abstract  Data copy()
          Returns a copy if this Data object.
abstract  boolean dataEquals(Data d)
          Checks if the value of this is equal to the given Data.
abstract  boolean equals(Data d)
          Checks if the value and id of this is equal to the given Data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id
Identifies the data (i.e., "microphone1" or "temperature"). Must be set by input. PTK components (e.g., Outputs) may check this string to determine if it can handle the data.

Constructor Detail

Data

protected Data()
Method Detail

equals

public abstract boolean equals(Data d)
Checks if the value and id of this is equal to the given Data.

Parameters:
d -
Returns:
boolean

dataEquals

public abstract boolean dataEquals(Data d)
Checks if the value of this is equal to the given Data.

Returns:
boolean true if the given Data has the same data and id as this Data

copy

public abstract Data copy()
Returns a copy if this Data object.

Returns: