VehicleProperties
A class holding a vehicle property.
A property can be in one of 3 states:
Unsupported: the property is not supported by the vehicle platform. In this case the property itself is set to
null
.Supported but unavailable: the property is temporarily unavailable or has invalid value. Indicated by the
value
field of the property being set tonull
.Available: the property is available and has a valid value.
Usage:
when {
property == null -> notSupported()
property.value == null -> supportedButNotAvailable()
else -> supportedAndAvailable()
}
Or when the supported state is not relevant:
when (property?.value) {
null -> notSupportedOrNotAvailable()
else -> supportedAndAvailable()
}
Constructors
Types
Property holding an optional Boolean value.
Property holding an optional List value.
Property holding an optional Number value.
Property holding an optional Comparable value (such as a number) constrained by the range.
Property holding an optional Set value of which the combination is guaranteed to be one of the combinations as provided by supportedCombinations.
Property holding an optional Set value.
Property holding an optional value of type T.
Property holding an optional String value.
Property holding an optional VehicleArea value.
Class to be extended by all vehicle properties.