com.vaadin.flow.component.timepicker.
Class StepsUtil
- java.lang.Object
-
- com.vaadin.flow.component.timepicker.StepsUtil
-
public class StepsUtil extends Object
Utility class around the time picker steps functionality. The logic in here is extracted for reuse by the DateTimePicker component.
NOTE: This class is not part of the public API surface and for internal use only
-
-
Field Summary
Fields Modifier and Type Field Description static Duration
DEFAULT_WEB_COMPONENT_STEP
Default step value of the web component, as Duration
-
Constructor Summary
Constructors Constructor Description StepsUtil()
-
Method Summary
All Methods Modifier and Type Method Description static double
convertDurationToStepsValue(Duration duration)
Converts a Duration object into a decimal value that is used internally by the time picker web component.
static Duration
convertStepsValueToDuration(double stepsValue)
Converts the decimal steps value use internally by the time picker web component into a Duration instance
-
-
-
Field Detail
-
DEFAULT_WEB_COMPONENT_STEP
public static final Duration DEFAULT_WEB_COMPONENT_STEP
Default step value of the web component, as Duration
-
-
Method Detail
-
convertDurationToStepsValue
public static double convertDurationToStepsValue(Duration duration)
Converts a Duration object into a decimal value that is used internally by the time picker web component.
Parameters:
duration
-Returns:
-
convertStepsValueToDuration
public static Duration convertStepsValueToDuration(double stepsValue)
Converts the decimal steps value use internally by the time picker web component into a Duration instance
Parameters:
stepsValue
-Returns:
-
-