Distance measured in km (Value Object).
no subtypes hierarchy
| Initializer |
Distance(Integer meters) |
| Attributes | |
hash | Source Codeshared actual Integer hashThe hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:
Therefore, a class which refines |
meters | Source Codeshared Integer meters |
string | Source Codeshared actual String stringA developer-friendly string representing the instance.
Concatenates the name of the concrete class of the
instance with the Refines Object.string |
| Methods | |
compare | Source Codeshared actual Comparison compare(Distance other)Compares this value with the given value. Implementations must respect the constraints that:
Refines Comparable.compare |
equals | Source Codeshared actual Boolean equals(Object other)Determine if two values are equal. Implementations should respect the constraints that:
Furthermore it is recommended that implementations
ensure that if A class which explicitly refines |
plus | Source Codeshared actual Distance plus(Distance other)The result of adding the given value to this value. This operation should never perform any kind of mutation upon either the receiving value or the argument value. Refines Summable.plus |
| Inherited Methods |
Methods inherited from: Comparable<Other> |
Methods inherited from: Summable<Other> |