edu.umass.cs.sase.engine
Class ValueVectorElementAvg

java.lang.Object
  extended by edu.umass.cs.sase.engine.ValueVectorElementAvg
All Implemented Interfaces:
ValueVectorElement

public class ValueVectorElementAvg
extends java.lang.Object
implements ValueVectorElement

This class represents the AVG aggregation.

Author:
haopeng

Constructor Summary
ValueVectorElementAvg()
           
 
Method Summary
 java.lang.String getAttribute()
           
 int getNeededByState()
           
 int getStateNumber()
           
 java.lang.String getType()
           
 int getValue()
          Gets the current value
 void initializeValue(Event e)
          initializes the value by an eventg
 void setAttribute(java.lang.String a)
           
 void setNeededByState(int neededByState)
           
 void updateValue(Event e)
          Updates the value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueVectorElementAvg

public ValueVectorElementAvg()
Method Detail

getValue

public int getValue()
Description copied from interface: ValueVectorElement
Gets the current value

Specified by:
getValue in interface ValueVectorElement
Returns:
the current value

updateValue

public void updateValue(Event e)
Description copied from interface: ValueVectorElement
Updates the value

Specified by:
updateValue in interface ValueVectorElement
Parameters:
e - the newly selected event

getStateNumber

public int getStateNumber()
Specified by:
getStateNumber in interface ValueVectorElement
Returns:
the state number of the value

getType

public java.lang.String getType()
Specified by:
getType in interface ValueVectorElement
Returns:
the opearation type, avg, max, min, set

getAttribute

public java.lang.String getAttribute()
Specified by:
getAttribute in interface ValueVectorElement
Returns:
the attribute name

initializeValue

public void initializeValue(Event e)
Description copied from interface: ValueVectorElement
initializes the value by an eventg

Specified by:
initializeValue in interface ValueVectorElement

setAttribute

public void setAttribute(java.lang.String a)
Specified by:
setAttribute in interface ValueVectorElement
Parameters:
a - the attribute name to set

getNeededByState

public int getNeededByState()
Specified by:
getNeededByState in interface ValueVectorElement

setNeededByState

public void setNeededByState(int neededByState)
Specified by:
setNeededByState in interface ValueVectorElement
Parameters:
neededByState - the neededByState to set