Package com.ibm.icu.text
Class RelativeDateTimeFormatter.RelDateTimeDataSink
- java.lang.Object
-
- com.ibm.icu.impl.UResource.Sink
-
- com.ibm.icu.text.RelativeDateTimeFormatter.RelDateTimeDataSink
-
- Enclosing class:
- RelativeDateTimeFormatter
private static final class RelativeDateTimeFormatter.RelDateTimeDataSink extends UResource.Sink
Sink for enumerating all of the relative data time formatter names. More specific bundles (en_GB) are enumerated before their parents (en_001, en, root): Only store a value if it is still missing, that is, it has not been overridden.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RelativeDateTimeFormatter.RelDateTimeDataSink.DateTimeUnit
-
Field Summary
Fields Modifier and Type Field Description (package private) int
pastFutureIndex
(package private) java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.AbsoluteUnit,java.util.EnumMap<RelativeDateTimeFormatter.Direction,java.lang.String>>>
qualitativeUnitMap
(package private) java.lang.StringBuilder
sb
(package private) RelativeDateTimeFormatter.Style
style
(package private) java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.RelativeUnit,java.lang.String[][]>>
styleRelUnitPatterns
(package private) RelativeDateTimeFormatter.RelDateTimeDataSink.DateTimeUnit
unit
-
Constructor Summary
Constructors Constructor Description RelDateTimeDataSink()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeTableRelative(UResource.Key key, UResource.Value value)
void
consumeTableRelativeTime(UResource.Key key, UResource.Value value)
void
consumeTimeDetail(UResource.Key key, UResource.Value value)
void
consumeTimeUnit(UResource.Key key, UResource.Value value)
private void
handleAlias(UResource.Key key, UResource.Value value, boolean noFallback)
private void
handlePlainDirection(UResource.Key key, UResource.Value value)
void
put(UResource.Key key, UResource.Value value, boolean noFallback)
Called once for each bundle (child-parent-...-root).private RelativeDateTimeFormatter.Style
styleFromAlias(UResource.Value value)
private RelativeDateTimeFormatter.Style
styleFromKey(UResource.Key key)
private static int
styleSuffixLength(RelativeDateTimeFormatter.Style style)
-
-
-
Field Detail
-
qualitativeUnitMap
java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.AbsoluteUnit,java.util.EnumMap<RelativeDateTimeFormatter.Direction,java.lang.String>>> qualitativeUnitMap
-
styleRelUnitPatterns
java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.RelativeUnit,java.lang.String[][]>> styleRelUnitPatterns
-
sb
java.lang.StringBuilder sb
-
pastFutureIndex
int pastFutureIndex
-
style
RelativeDateTimeFormatter.Style style
-
-
Method Detail
-
styleFromKey
private RelativeDateTimeFormatter.Style styleFromKey(UResource.Key key)
-
styleFromAlias
private RelativeDateTimeFormatter.Style styleFromAlias(UResource.Value value)
-
styleSuffixLength
private static int styleSuffixLength(RelativeDateTimeFormatter.Style style)
-
consumeTableRelative
public void consumeTableRelative(UResource.Key key, UResource.Value value)
-
consumeTableRelativeTime
public void consumeTableRelativeTime(UResource.Key key, UResource.Value value)
-
consumeTimeDetail
public void consumeTimeDetail(UResource.Key key, UResource.Value value)
-
handlePlainDirection
private void handlePlainDirection(UResource.Key key, UResource.Value value)
-
consumeTimeUnit
public void consumeTimeUnit(UResource.Key key, UResource.Value value)
-
handleAlias
private void handleAlias(UResource.Key key, UResource.Value value, boolean noFallback)
-
put
public void put(UResource.Key key, UResource.Value value, boolean noFallback)
Description copied from class:UResource.Sink
Called once for each bundle (child-parent-...-root). The value is normally an array or table resource, and implementations of this method normally iterate over the tree of resource items stored there.- Specified by:
put
in classUResource.Sink
- Parameters:
key
- Initially the key string of the enumeration-start resource. Empty if the enumeration starts at the top level of the bundle. Reuse for output values from Array and Table getters.value
- Call getArray() or getTable() as appropriate. Then reuse for output values from Array and Table getters.noFallback
- true if the bundle has no parent; that is, its top-level table has the nofallback attribute, or it is the root bundle of a locale tree.
-
-