@Override
    public int compareTo(Weeks otherAmount) {
        int thisValue = this.weeks;
        int otherValue = otherAmount.weeks;
        return Integer.compare(thisValue, otherValue);
    }
@ Override public int compareTo ( Weeks otherAmount ) { int thisValue = this . weeks ; int otherValue = otherAmount . weeks ; return Integer . compare ( thisValue , otherValue ) ; }
Compares this amount to the specified {@code Weeks}.
<p>
The comparison is based on the total length of the amounts.
It is "consistent with equals", as defined by {@link Comparable}.

@param otherAmount  the other amount, not null
@return the comparator value, negative if less, positive if greater