edu.berkeley.guir.ptk.data
Class DataFile

java.lang.Object
  extended byedu.berkeley.guir.ptk.data.Data
      extended byedu.berkeley.guir.ptk.data.DataFile
All Implemented Interfaces:
java.io.Serializable

public class DataFile
extends Data

Data type for containing a file, such as a sound file, images, text file, etc. Contains file data, such as a sound file, images, text file, etc. Inherits an id field, which is set by the creator of the object and indentifies it.

Author:
tmatthew
See Also:
Serialized Form

Field Summary
 java.io.File data
          File data for this object.
 
Fields inherited from class edu.berkeley.guir.ptk.data.Data
id
 
Constructor Summary
DataFile(java.io.File data)
           
DataFile(java.io.File data, java.lang.String id)
           
 
Method Summary
 Data copy()
          Returns a copy if this Data object.
 boolean dataEquals(Data d)
          Compares the data fields of this Data and the given Data for equality.
 boolean equals(Data d)
          Compares this Data and the given Data for equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

public java.io.File data
File data for this object.

Constructor Detail

DataFile

public DataFile(java.io.File data,
                java.lang.String id)

DataFile

public DataFile(java.io.File data)
Method Detail

equals

public boolean equals(Data d)
Compares this Data and the given Data for equality.

Specified by:
equals in class Data
Parameters:
d -
Returns:
boolean true if the given Data has the same data and id as this Data

dataEquals

public boolean dataEquals(Data d)
Compares the data fields of this Data and the given Data for equality.

Specified by:
dataEquals in class Data
Returns:
boolean true if the given Data has the same data as this Data

copy

public Data copy()
Description copied from class: Data
Returns a copy if this Data object.

Specified by:
copy in class Data
Returns: