@Test public void testSubtract() { Frequency high = Frequency.ofGHz(1); Frequency low = Frequency.ofMHz(100); Frequency expected = Frequency.ofMHz(900); assertThat(high.subtract(low), is(expected)); }
public Frequency subtract(Frequency value) { return new Frequency(this.frequency - value.frequency); }
Frequency implements RichComparable<Frequency> { public Frequency subtract(Frequency value) { return new Frequency(this.frequency - value.frequency); } }
Frequency implements RichComparable<Frequency> { public Frequency subtract(Frequency value) { return new Frequency(this.frequency - value.frequency); } private  Frequency(long frequency); }
Frequency implements RichComparable<Frequency> { public Frequency subtract(Frequency value) { return new Frequency(this.frequency - value.frequency); } private  Frequency(long frequency); long asHz(); static Frequency ofHz(long value); static Frequency ofKHz(long value); static Frequency ofKHz(double value); static Frequency ofMHz(long value); static Frequency ofMHz(double value); static Frequency ofGHz(long value); static Frequency ofGHz(double value); static Frequency ofTHz(long value); static Frequency ofTHz(double value); Frequency add(Frequency value); Frequency subtract(Frequency value); Frequency multiply(long value); Frequency floorDivision(long value); @Override int compareTo(Frequency other); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Frequency implements RichComparable<Frequency> { public Frequency subtract(Frequency value) { return new Frequency(this.frequency - value.frequency); } private  Frequency(long frequency); long asHz(); static Frequency ofHz(long value); static Frequency ofKHz(long value); static Frequency ofKHz(double value); static Frequency ofMHz(long value); static Frequency ofMHz(double value); static Frequency ofGHz(long value); static Frequency ofGHz(double value); static Frequency ofTHz(long value); static Frequency ofTHz(double value); Frequency add(Frequency value); Frequency subtract(Frequency value); Frequency multiply(long value); Frequency floorDivision(long value); @Override int compareTo(Frequency other); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }