Package com.ibm.icu.impl
Class DayPeriodRules
java.lang.Object
com.ibm.icu.impl.DayPeriodRules
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enum
static enum
private static class
private static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DayPeriodRules.DayPeriodRulesData
private DayPeriodRules.DayPeriod[]
private boolean
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
add
(int startHour, int limitHour, DayPeriodRules.DayPeriod period) getDayPeriodForHour
(int hour) private int
getEndHourForDayPeriod
(DayPeriodRules.DayPeriod dayPeriod) static DayPeriodRules
getInstance
(ULocale locale) Get a DayPeriodRules object given a locale.double
getMidPointForDayPeriod
(DayPeriodRules.DayPeriod dayPeriod) private int
getStartHourForDayPeriod
(DayPeriodRules.DayPeriod dayPeriod) boolean
boolean
hasNoon()
private static DayPeriodRules.DayPeriodRulesData
loadData()
private static int
parseSetNum
(String setNumStr)
-
Field Details
-
DATA
-
hasMidnight
private boolean hasMidnight -
hasNoon
private boolean hasNoon -
dayPeriodForHour
-
-
Constructor Details
-
DayPeriodRules
private DayPeriodRules()
-
-
Method Details
-
getInstance
Get a DayPeriodRules object given a locale. If data hasn't been loaded, it will be loaded for all locales at once.- Parameters:
locale
- locale for which the DayPeriodRules object is requested.- Returns:
- a DayPeriodRules object for
locale
.
-
getMidPointForDayPeriod
-
loadData
-
getStartHourForDayPeriod
private int getStartHourForDayPeriod(DayPeriodRules.DayPeriod dayPeriod) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getEndHourForDayPeriod
-
hasMidnight
public boolean hasMidnight() -
hasNoon
public boolean hasNoon() -
getDayPeriodForHour
-
add
-
parseSetNum
-