@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(Map<String,String> componentValues) |
Map<String,String> |
externalToComponentValue(Duration duration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateOptionspublic 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(Map<String,String> componentValues)
componentToExternalValue in interface IComponentValueConverter<Duration,String>componentValues - The value on the component.public Map<String,String> externalToComponentValue(Duration duration)
externalToComponentValue in interface IComponentValueConverter<Duration,String>duration - The value on the backing bean or the model.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.