FormattedDistanceData

class FormattedDistanceData

Represents a distance that has been formatted and potentially rounded for display purposes.

Parameters

distance

the calculated distance value

distanceAsString

a rounded string representation of the distance. For example a distance value of 19.3121 might result in a string value of '19'

distanceSuffix

a suffix that goes with the string value of the distance like 'km' for kilometers, 'ft' for foot/feet, 'mi' for miles etc. depending on the Locale and the UnitType

unitType

indicates if the values represented are metric or imperial

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Returns a hash code value for the object.
toString
Link copied to clipboard
open override fun toString(): String
The toString implementation

Properties

distance
Link copied to clipboard
val distance: Double
the calculated distance value
distanceAsString
Link copied to clipboard
val distanceAsString: String
a rounded string representation of the distance.
distanceSuffix
Link copied to clipboard
val distanceSuffix: String
a suffix that goes with the string value of the distance like 'km' for kilometers, 'ft' for foot/feet, 'mi' for miles etc.
unitType
Link copied to clipboard
val unitType: UnitType
indicates if the values represented are metric or imperial