Class IntegerValue

    • 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.
        Specified by:
        add in class Value
        Parameters:
        other - the additional coverage details
        Returns:
        the sum of this and the additional coverage
      • 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.
        Specified by:
        max in class Value
        Parameters:
        other - the other coverage
        Returns:
        the merged 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.
        Specified by:
        delta in class Value
        Parameters:
        other - the value to compare with
        Returns:
        the delta of this and the additional value
      • isOutOfValidRange

        public boolean isOutOfValidRange​(double threshold)
        Returns whether this integer value is larger than the given threshold.
        Specified by:
        isOutOfValidRange in class Value
        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.
        Specified by:
        serialize in class Value
        Returns:
        a String serialization of this value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Value