edu.umass.cs.sase.stream
Class ABCEvent

java.lang.Object
  extended by edu.umass.cs.sase.stream.ABCEvent
All Implemented Interfaces:
Event

public class ABCEvent
extends java.lang.Object
implements Event

This class represents a kind of event.

Author:
haopeng

Constructor Summary
ABCEvent(int i, int ts, java.lang.String et, int p)
          Constructor
 
Method Summary
 java.lang.Object clone()
           
 int getAttributeByName(java.lang.String attributeName)
          Returns the value of the attribute with the required name
 double getAttributeByNameDouble(java.lang.String attributeName)
          Returns the value of the attribute with the required name
 java.lang.String getAttributeByNameString(java.lang.String attributeName)
          Returns the value of the attribute with the required name
 int getAttributeValueType(java.lang.String attributeName)
          Returns the value type of the attribute
 java.lang.String getEventType()
           
 int getId()
           
 int getPrice()
           
 int getTimestamp()
           
 void setEventType(java.lang.String eventType)
           
 void setId(int id)
           
 void setPrice(int price)
           
 void setTimestamp(int timestamp)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ABCEvent

public ABCEvent(int i,
                int ts,
                java.lang.String et,
                int p)
Constructor

Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in interface Event
Overrides:
clone in class java.lang.Object
Returns:
the cloned event

getId

public int getId()
Specified by:
getId in interface Event
Returns:
the id

setId

public void setId(int id)
Specified by:
setId in interface Event
Parameters:
id - the id to set

getTimestamp

public int getTimestamp()
Specified by:
getTimestamp in interface Event
Returns:
the timestamp

setTimestamp

public void setTimestamp(int timestamp)
Parameters:
timestamp - the timestamp to set

getEventType

public java.lang.String getEventType()
Specified by:
getEventType in interface Event
Returns:
the eventType

setEventType

public void setEventType(java.lang.String eventType)
Parameters:
eventType - the eventType to set

getPrice

public int getPrice()
Returns:
the price

setPrice

public void setPrice(int price)
Parameters:
price - the price to set

toString

public java.lang.String toString()
Specified by:
toString in interface Event
Overrides:
toString in class java.lang.Object
Returns:
self description

getAttributeByName

public int getAttributeByName(java.lang.String attributeName)
Description copied from interface: Event
Returns the value of the attribute with the required name

Specified by:
getAttributeByName in interface Event
Parameters:
attributeName - the required attribute name
Returns:
the value of the attribute, integer

getAttributeByNameString

public java.lang.String getAttributeByNameString(java.lang.String attributeName)
Description copied from interface: Event
Returns the value of the attribute with the required name

Specified by:
getAttributeByNameString in interface Event
Parameters:
attributeName - the required attribute name
Returns:
the value of the attribute, string

getAttributeValueType

public int getAttributeValueType(java.lang.String attributeName)
Description copied from interface: Event
Returns the value type of the attribute

Specified by:
getAttributeValueType in interface Event
Parameters:
attributeName - the required attribute name
Returns:
the code representing the type, 0 for integer, 1 for double, 2 for string

getAttributeByNameDouble

public double getAttributeByNameDouble(java.lang.String attributeName)
Description copied from interface: Event
Returns the value of the attribute with the required name

Specified by:
getAttributeByNameDouble in interface Event
Parameters:
attributeName - the required attribute name
Returns:
the value of the attribute, double