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

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

public class DivFunction
extends TelemetryFunction

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

Author:
(Cedric) Qin ZHANG

Constructor Summary
DivFunction()
          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

DivFunction

public DivFunction()
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.