@Test public void canBeConstructedWithDifferentUnits() { assertThat(new Ratio(25.0, RatioUnit.PERCENT).asBasic()).isEqualTo(0.25, ALLOWED_OFFSET); assertThat(new Ratio(35.6, RatioUnit.PERMILLE).asBasic()).isEqualTo(0.0356, ALLOWED_OFFSET); assertThat(new Ratio(0.821, RatioUnit.BASIC).asBasic()).isEqualTo(0.821, ALLOWED_OFFSET); }
public double asBasic() { return value; }
Ratio implements Comparable<Ratio> { public double asBasic() { return value; } }
Ratio implements Comparable<Ratio> { public double asBasic() { return value; } Ratio(final double value);  Ratio(final double value, final RatioUnit unit); }
Ratio implements Comparable<Ratio> { public double asBasic() { return 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> { public double asBasic() { return 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; }