Package com.ibm.icu.text
Class DateIntervalInfo.DateIntervalSink
- java.lang.Object
-
- com.ibm.icu.impl.UResource.Sink
-
- com.ibm.icu.text.DateIntervalInfo.DateIntervalSink
-
- Enclosing class:
- DateIntervalInfo
private static final class DateIntervalInfo.DateIntervalSink extends UResource.Sink
Sink for enumerating all of the date interval skeletons.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ACCEPTED_PATTERN_LETTERS
Accepted pattern letters: Calendar.YEAR Calendar.MONTH Calendar.DATE Calendar.AM_PM Calendar.HOUR Calendar.HOUR_OF_DAY Calendar.MINUTE Calendar.SECOND Calendar.MILLISECONDprivate static java.lang.String
DATE_INTERVAL_PATH_PREFIX
private static java.lang.String
DATE_INTERVAL_PATH_SUFFIX
(package private) DateIntervalInfo
dateIntervalInfo
(package private) java.lang.String
nextCalendarType
-
Constructor Summary
Constructors Constructor Description DateIntervalSink(DateIntervalInfo dateIntervalInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAndResetNextCalendarType()
Returns and resets the next calendar type.private java.lang.String
getCalendarTypeFromPath(java.lang.String path)
Extracts the calendar type from the pathvoid
processSkeletonTable(UResource.Key key, UResource.Value value)
Processes the patterns for a skeleton table.void
put(UResource.Key key, UResource.Value value, boolean noFallback)
Called once for each bundle (child-parent-...-root).private void
setIntervalPatternIfAbsent(java.lang.String currentSkeleton, java.lang.String lrgDiffCalUnit, UResource.Value intervalPattern)
Stores the interval pattern for the current skeleton in the internal data structure if it's not present.private java.lang.CharSequence
validateAndProcessPatternLetter(java.lang.CharSequence patternLetter)
Processes the pattern letter
-
-
-
Field Detail
-
ACCEPTED_PATTERN_LETTERS
private static final java.lang.String ACCEPTED_PATTERN_LETTERS
Accepted pattern letters: Calendar.YEAR Calendar.MONTH Calendar.DATE Calendar.AM_PM Calendar.HOUR Calendar.HOUR_OF_DAY Calendar.MINUTE Calendar.SECOND Calendar.MILLISECOND- See Also:
- Constant Field Values
-
dateIntervalInfo
DateIntervalInfo dateIntervalInfo
-
nextCalendarType
java.lang.String nextCalendarType
-
DATE_INTERVAL_PATH_PREFIX
private static final java.lang.String DATE_INTERVAL_PATH_PREFIX
-
DATE_INTERVAL_PATH_SUFFIX
private static final java.lang.String DATE_INTERVAL_PATH_SUFFIX
-
-
Constructor Detail
-
DateIntervalSink
public DateIntervalSink(DateIntervalInfo dateIntervalInfo)
-
-
Method Detail
-
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.
-
processSkeletonTable
public void processSkeletonTable(UResource.Key key, UResource.Value value)
Processes the patterns for a skeleton table.
-
getAndResetNextCalendarType
public java.lang.String getAndResetNextCalendarType()
Returns and resets the next calendar type.- Returns:
- Next calendar type
-
getCalendarTypeFromPath
private java.lang.String getCalendarTypeFromPath(java.lang.String path)
Extracts the calendar type from the path- Parameters:
path
-- Returns:
- Calendar Type
-
validateAndProcessPatternLetter
private java.lang.CharSequence validateAndProcessPatternLetter(java.lang.CharSequence patternLetter)
Processes the pattern letter- Parameters:
patternLetter
-- Returns:
- Pattern letter
-
setIntervalPatternIfAbsent
private void setIntervalPatternIfAbsent(java.lang.String currentSkeleton, java.lang.String lrgDiffCalUnit, UResource.Value intervalPattern)
Stores the interval pattern for the current skeleton in the internal data structure if it's not present.- Parameters:
lrgDiffCalUnit
-intervalPattern
-
-
-