Package de.xima.fc.common.time
Interface IPresetTemporalFormatterBuilder
-
public interface IPresetTemporalFormatterBuilder
Builder for formatting a temporal object (like a date or time) into a localized string, seeIPresetTemporalFormatter
. Allows configuring various options before callingformat(Temporal)
.- Since:
- 8.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
format(Temporal temporal)
Formats the given temporal object into a localized string.IPresetTemporalFormatterBuilder
locale(Locale locale)
Sets the locale to use when the formatting style requires locale-sensitive operations.IPresetTemporalFormatterBuilder
zone(ZoneId zone)
Sets the default time zone to use when atime zone required and the temporal to format does not have a zone.
-
-
-
Method Detail
-
format
String format(Temporal temporal)
Formats the given temporal object into a localized string.- Parameters:
temporal
- The temporal object to format, never null.- Returns:
- A localized string representing the temporal object, never null.
-
locale
IPresetTemporalFormatterBuilder locale(Locale locale)
Sets the locale to use when the formatting style requires locale-sensitive operations. When not given, an implementation-specific default is used.- Parameters:
locale
- The locale to use for formatting, never null.- Returns:
- The builder instance for method chaining.
-
zone
IPresetTemporalFormatterBuilder zone(ZoneId zone)
Sets the default time zone to use when atime zone required and the temporal to format does not have a zone. When not given, an implementation-specific default is used.- Parameters:
zone
- The time zone to use for formatting, never null.- Returns:
- The builder instance for method chaining.
-
-