Class SpeedLimitApi
-
- All Implemented Interfaces:
public final class SpeedLimitApiAn implementation of the SpeedLimitApi for formatting speed limit view related data.
-
-
Field Summary
Fields Modifier and Type Field Description private ValueFormatter<UpdateSpeedLimitValue, String>formatter
-
Constructor Summary
Constructors Constructor Description SpeedLimitApi(ValueFormatter<UpdateSpeedLimitValue, String> formatter)
-
Method Summary
Modifier and Type Method Description final ValueFormatter<UpdateSpeedLimitValue, String>getFormatter()final UnitsetFormatter(ValueFormatter<UpdateSpeedLimitValue, String> formatter)final Expected<UpdateSpeedLimitValue, UpdateSpeedLimitError>updateSpeedLimit(SpeedLimit speedLimit)Evaluates the SpeedLimit data into a state that can be rendered by the view.
-
-
-
Constructor Detail
-
SpeedLimitApi
SpeedLimitApi(ValueFormatter<UpdateSpeedLimitValue, String> formatter)
- Parameters:
formatter- formats the speed limit data into a string for displaying in the UI
-
-
Method Detail
-
getFormatter
final ValueFormatter<UpdateSpeedLimitValue, String> getFormatter()
-
setFormatter
final Unit setFormatter(ValueFormatter<UpdateSpeedLimitValue, String> formatter)
- Parameters:
formatter- formats the speed limit data into a string for displaying in the UI
-
updateSpeedLimit
final Expected<UpdateSpeedLimitValue, UpdateSpeedLimitError> updateSpeedLimit(SpeedLimit speedLimit)
Evaluates the SpeedLimit data into a state that can be rendered by the view.
- Parameters:
speedLimit- a speedLimit instance
-
-