org.hackystat.telemetry.analyzer.function.impl
Class MulFunction

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.function.TelemetryFunction
      extended by org.hackystat.telemetry.analyzer.function.impl.MulFunction

public class MulFunction
extends TelemetryFunction

If passed two numbers, returns their product, and if passed two telemetry streams, returns a new TelemetryStreamCollection containing the pairwise multiplication of the individual elements.

Author:
(Cedric) Qin ZHANG, Philip Johnson

Constructor Summary
MulFunction()
          Constructs this instance.
 
Method Summary
 java.lang.Object compute(java.lang.Object[] parameters)
          Invokes the function.
 
Methods inherited from class org.hackystat.telemetry.analyzer.function.TelemetryFunction
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulFunction

public MulFunction()
Constructs this instance.

Method Detail

compute

public java.lang.Object compute(java.lang.Object[] parameters)
                         throws TelemetryFunctionException
Description copied from class: TelemetryFunction
Invokes the function. Note that multiple thread might call this method at the same time. The implementation must be thread-safe.

Specified by:
compute in class TelemetryFunction
Parameters:
parameters - An array of 2 objects of type either Number or TelemetryStreamCollection.
Returns:
Either an instance of Number or TelemetryStreamCollection.
Throws:
TelemetryFunctionException - If anything is wrong.