Interface ResourceUnit

    • Method Detail

      • compareTo

        int compareTo​(long thisSize,
                      long thatSize,
                      ResourceUnit thatUnit)
               throws java.lang.IllegalArgumentException
        Compares thisSize in this unit to thatSize in thatUnit.

        Returns 1, 0, or -1 if the thisSize of this is greater than, equal to, or less than thatSize of thatUnit respectively.

        Parameters:
        thisSize - size in this unit
        thatSize - size in thatUnit
        thatUnit - other ResourceUnit
        Returns:
        as per the compareTo contract
        Throws:
        java.lang.IllegalArgumentException - if the units are not comparable