Class SampleArrayFunctions
- java.lang.Object
-
- org.opennms.netmgt.measurements.impl.SampleArrayFunctions
-
public class SampleArrayFunctions extends java.lang.Object
Returns prior samples of given attribute from jexl context- Author:
- cgallen
-
-
Constructor Summary
Constructors Constructor Description SampleArrayFunctions(org.apache.commons.jexl2.JexlContext context)
The context will be populated by jexl prior to expression execution
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
arrayFirst(java.lang.String sampleName, int n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return first sample value sample[0]java.lang.Double
arrayNaN(java.lang.String sampleName, int n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return Not a Number (NaN)java.lang.Double
arrayStart(java.lang.String sampleName, int n, double start)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return substitute sample valuejava.lang.Double
arrayZero(java.lang.String sampleName, java.lang.Integer n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return zero (0)
-
-
-
Method Detail
-
arrayZero
public java.lang.Double arrayZero(java.lang.String sampleName, java.lang.Integer n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return zero (0)- Parameters:
sampleName
- name of attributei
- number of samples prior to return- Returns:
- sample n-i or Zero (0) if sample before start of received sequence. NaN if sampleName not in jexl context
-
arrayFirst
public java.lang.Double arrayFirst(java.lang.String sampleName, int n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return first sample value sample[0]- Parameters:
sampleName
- name of attributei
- number of samples prior to return- Returns:
- sample n-i or sample[0] if sample before start of received sequence. NaN if sampleName not in jexl context
-
arrayNaN
public java.lang.Double arrayNaN(java.lang.String sampleName, int n)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return Not a Number (NaN)- Parameters:
sampleName
- name of attributei
- number of samples prior to return- Returns:
- sample n-i or not a number (NaN) if sample before start of received sequence. NaN if sampleName not in jexl context
-
arrayStart
public java.lang.Double arrayStart(java.lang.String sampleName, int n, double start)
Returns prior sample value of attribute 'sampleName' y = sample[i - n] If selected sample is before start of retrieved samples return substitute sample value- Parameters:
sampleName
- name of attributei
- number of samples prior to returnstart
- replace references before start of samples with this value- Returns:
- sample n-i or substitute if sample before start of received sequence. NaN if sampleName not in jexl context
-
-