Class MeasurementValue
- java.lang.Object
-
- com.bw.jtools.profiling.measurement.MeasurementValue
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Comparable<MeasurementValue>
public class MeasurementValue extends java.lang.Object implements java.lang.Comparable<MeasurementValue>, java.lang.Cloneable
Holds a measurement value.
Holds a value that is produced by some measurement function.
The first dimension defines the order relation and have to be strictly monotone.
-
-
Field Summary
Fields Modifier and Type Field Description long[]values
-
Constructor Summary
Constructors Constructor Description MeasurementValue(long[] values)C'tor to be used by all inheritances.
-
Method Summary
Modifier and Type Method Description voidadd(MeasurementValue other)Adds some value.MeasurementValueclone()intcompareTo(MeasurementValue other)booleangreaterThan(MeasurementValue other)Convenience variant.booleanlessThan(MeasurementValue other)Convenience variant.voidsubtract(MeasurementValue other)Subtract some value.
-
-
-
Method Detail
-
clone
public MeasurementValue clone()
- Overrides:
clonein classjava.lang.Object
-
subtract
public void subtract(MeasurementValue other)
Subtract some value.- Parameters:
other- The value to subtract.
-
add
public void add(MeasurementValue other)
Adds some value.- Parameters:
other- The value to add.
-
compareTo
public int compareTo(MeasurementValue other)
- Specified by:
compareToin interfacejava.lang.Comparable<MeasurementValue>
-
lessThan
public boolean lessThan(MeasurementValue other)
Convenience variant. Same as "compareTo(other) < 0".- Parameters:
other- The other instance.- Returns:
- true if this instance is less than the other.
-
greaterThan
public boolean greaterThan(MeasurementValue other)
Convenience variant. Same as "compareTo(other) > 0".- Parameters:
other- The other instance.- Returns:
- true if this instance is greater than the other.
-
-