@OpenApi
public class MetricResult
extends java.lang.Object
Constructor and Description |
---|
MetricResult(float value)
Create a new metric result that contains a Real type of value;
|
MetricResult(int value)
Create a new metric result that contains a Integer type of value;
|
MetricResult(MetricValue value)
Creates a MetricResult and set its value to value
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(MetricValue value)
Add a value to the metric value
|
static MetricValue |
create(float value)
Creates and returns a RealValue type.
|
static MetricValue |
create(int value)
Creates and returns a IntegerValue type.
|
int |
getCalculatedElements()
Number of elements calculated.
|
MetricValue |
getValue()
Return the MetricValue instance
|
float |
getValueAsFloat()
Get value as float.
|
int |
getValueAsInteger()
Get value as int.
|
boolean |
hasValidResult()
Return if it has a validResult.
|
void |
incrementCalculatedElements()
Increment the number of elements calculated.
|
boolean |
isAboveLimit()
Return if the result is above limit
|
boolean |
isBelowLimit()
Return if the result is below limit
|
boolean |
isDifferentFromZero()
Compare the value to zero and return a boolean indicating the result
In case of null value, returns false;
|
void |
setAboveLimit(boolean aboveLimit)
Set to true is value is above Limit
|
void |
setBelowLimit(boolean belowLimit)
Set to true is value is above Limit
|
void |
setCalculatedElements(int calculatedElements)
Set the number of elements calculated.
|
void |
setMaxValue(MetricValue value,
MetricValue value2)
Set the value to the maximum value of the two parameters
|
void |
setMinValue(MetricValue value,
MetricValue value2)
Set the value to the minimum value of the two parameters
|
void |
setValue(float value)
Set create an Real type value
|
void |
setValue(int value)
Set create an Integer type value
|
void |
setValue(MetricValue value)
Set MetricValue to the given value
|
@OpenApi public MetricResult(MetricValue value)
value
- instance of MetricValue.@OpenApi public MetricResult(int value)
value
- @OpenApi public MetricResult(float value)
value
- @OpenApi public boolean isAboveLimit()
@OpenApi public void setAboveLimit(boolean aboveLimit)
aboveLimit
- @OpenApi public boolean isBelowLimit()
@OpenApi public void setBelowLimit(boolean belowLimit)
belowLimit
- @OpenApi public void addValue(MetricValue value)
value
- @OpenApi public MetricValue getValue()
@OpenApi public void setValue(MetricValue value)
value
- MetricValue@OpenApi public void setValue(int value)
value
- integer@OpenApi public void setValue(float value)
value
- float@OpenApi public void setMinValue(MetricValue value, MetricValue value2)
value
- MetricValuevalue2
- MetricValue@OpenApi public void setMaxValue(MetricValue value, MetricValue value2)
value
- MetricValuevalue2
- MetricValue@OpenApi public boolean isDifferentFromZero()
@OpenApi public float getValueAsFloat()
@OpenApi public int getValueAsInteger()
@OpenApi public boolean hasValidResult()
@OpenApi public static MetricValue create(float value)
value
- float@OpenApi public static MetricValue create(int value)
value
- int@OpenApi public void setCalculatedElements(int calculatedElements)
calculatedElements
- int@OpenApi public void incrementCalculatedElements()
@OpenApi public int getCalculatedElements()