@Immutable public class DurationPartsConverter extends Object implements IComponentValueConverter<Duration,String>
IComponentValueConverter
for splitting a Duration
field into its components.Modifier and Type | Field and Description |
---|---|
static IComponentValueConverter<Duration,String> |
DAYS_HOURS_MINUTES
The immutable, thread-safe instance of a converter for splitting a
Duration field into its days, hours, and
minutes. |
static IComponentValueConverter<Duration,String> |
WEEKS_DAYS_HOURS
The immutable, thread-safe instance of a converter for splitting a
Duration field into its weeks, days, and
hours. |
Constructor and Description |
---|
DurationPartsConverter(TemporalUnit[] units)
Creates a new parts converter with the given parts.
|
Modifier and Type | Method and Description |
---|---|
Duration |
componentToExternalValue(IConvertibleMap<String> componentValues) |
IConvertibleMap<String> |
externalToComponentValue(Duration duration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createOptions, newConvertibleMap
public static final IComponentValueConverter<Duration,String> DAYS_HOURS_MINUTES
Duration
field into its days, hours, and
minutes.public static final IComponentValueConverter<Duration,String> WEEKS_DAYS_HOURS
Duration
field into its weeks, days, and
hours.public DurationPartsConverter(TemporalUnit[] units)
units
- The units (bases) of the parts to extract.public Duration componentToExternalValue(IConvertibleMap<String> componentValues)
componentToExternalValue
in interface IComponentValueConverter<Duration,String>
componentValues
- The value on the component.public IConvertibleMap<String> externalToComponentValue(Duration duration)
externalToComponentValue
in interface IComponentValueConverter<Duration,String>
duration
- The value on the backing bean or the model.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.