This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A00100-HS8A06-WV4P70-53M275-8RRN21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Distance { | |
private static final float METERS_TO_INCHES_RATIO = 39.3701f; | |
private final float meters; | |
private Distance(float meters) { | |
if (meters < 0f) { | |
throw new InvalidDistanceException(); | |
} | |
this.meters = meters; |