Class IntegerValue
- java.lang.Object
-
- com.parasoft.findings.jenkins.coverage.model.Value
-
- com.parasoft.findings.jenkins.coverage.model.IntegerValue
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CyclomaticComplexity
,LinesOfCode
public abstract class IntegerValue extends Value
Represents the value of an integer based metric.- Author:
- Melissa Bauer
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IntegerValue
add(Value other)
Add the coverage from the specified instance to the coverage of this instance.protected abstract IntegerValue
create(int value)
org.apache.commons.lang3.math.Fraction
delta(Value other)
Computes the delta of this value with the specified value.boolean
equals(Object o)
int
getValue()
Returns the value of this metric.int
hashCode()
boolean
isOutOfValidRange(double threshold)
Returns whether this integer value is larger than the given threshold.IntegerValue
max(Value other)
Merge this coverage with the specified coverage.String
serialize()
Serializes this instance into a String.String
toString()
-
-
-
Method Detail
-
getValue
public int getValue()
Returns the value of this metric.- Returns:
- the integer value
-
add
public IntegerValue add(Value other)
Description copied from class:Value
Add the coverage from the specified instance to the coverage of this instance.
-
create
protected abstract IntegerValue create(int value)
-
max
public IntegerValue max(Value other)
Description copied from class:Value
Merge this coverage with the specified coverage.
-
delta
public org.apache.commons.lang3.math.Fraction delta(Value other)
Description copied from class:Value
Computes the delta of this value with the specified value.
-
isOutOfValidRange
public boolean isOutOfValidRange(double threshold)
Returns whether this integer value is larger than the given threshold.- Specified by:
isOutOfValidRange
in classValue
- Parameters:
threshold
- the threshold- Returns:
true
, if this value is larger than the specified threshold
-
serialize
public String serialize()
Description copied from class:Value
Serializes this instance into a String.
-
-