@Test public void comparesToOtherInstancesUsingTheBaseValue() { assertThat(new Ratio(1.0).compareTo(new Ratio(2.0))).isNegative(); assertThat(new Ratio(2.0).compareTo(new Ratio(1.0))).isPositive(); assertThat(new Ratio(1.0).compareTo(new Ratio(1.0))).isZero(); assertThat(new Ratio(-1.0).compareTo(new Ratio(1.0))).isNegative(); }
@Override public int compareTo(final Ratio other) { return Double.compare(value, other.value); }
Ratio implements Comparable<Ratio> { @Override public int compareTo(final Ratio other) { return Double.compare(value, other.value); } }
Ratio implements Comparable<Ratio> { @Override public int compareTo(final Ratio other) { return Double.compare(value, other.value); } Ratio(final double value);  Ratio(final double value, final RatioUnit unit); }
Ratio implements Comparable<Ratio> { @Override public int compareTo(final Ratio other) { return Double.compare(value, other.value); } Ratio(final double value);  Ratio(final double value, final RatioUnit unit); double asBasic(); static Ratio average(final Iterable<Ratio> rates); @Override int compareTo(final Ratio other); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); }
Ratio implements Comparable<Ratio> { @Override public int compareTo(final Ratio other) { return Double.compare(value, other.value); } Ratio(final double value);  Ratio(final double value, final RatioUnit unit); double asBasic(); static Ratio average(final Iterable<Ratio> rates); @Override int compareTo(final Ratio other); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static final Ratio MIN_VALUE; }