FloatValue extends NumberValueAdapter<Double> { @Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } FloatValue values = (FloatValue) o; return Double.compare( values.val, val ) == 0; } FloatValue( double val ); @Override Type type(); @Override Double asNumber(); @Override long asLong(); @Override int asInt(); @Override double asDouble(); @Override float asFloat(); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString();  }
@Test void testEquals() { FloatValue firstValue = new FloatValue( 6.28 ); FloatValue secondValue = new FloatValue( 6.28 ); assertThat( firstValue, equalTo( secondValue ) ); }