edu.berkeley.guir.ptk.history
Class HistoryItem

java.lang.Object
  extended byedu.berkeley.guir.ptk.history.HistoryItem

public class HistoryItem
extends java.lang.Object

This is a container for events that are added to History. Contains the Event object and a pointer to the original event, if the event is abstracted (the original event is the pre-abstracted event). If the event is an original (i.e., it has not yet been abstracted) then the original data field is null. A null original field is what distinques pre from post abstracted events in the "get" methods in the History class.

Author:
tmatthew

Field Summary
 Event event
          The event that is being stored in history.
 Event original
          Reference to the original event (pre-abstraction), if this HistoryItem is of a post-abstracted event.
 
Constructor Summary
HistoryItem()
           
HistoryItem(Event event, Event original)
          Parameterized constructor.
 
Method Summary
 boolean isOriginal()
          Returns a boolean indication of whether or not this object represents an original event (as opposed to an abstracted event).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

event

public Event event
The event that is being stored in history.


original

public Event original
Reference to the original event (pre-abstraction), if this HistoryItem is of a post-abstracted event. If this HistoryItem is of an original event, this field is null.

Constructor Detail

HistoryItem

public HistoryItem()

HistoryItem

public HistoryItem(Event event,
                   Event original)
Parameterized constructor.

Parameters:
event - The event that is being added to history.
original - If the event being added is an abstracted event, this should be a reference to the original event from which the abstracted event was derived. If this is an original event, this should be null.
Method Detail

isOriginal

public boolean isOriginal()
Returns a boolean indication of whether or not this object represents an original event (as opposed to an abstracted event).

Returns:
boolean True if this event is a preabstracted event.