Package ch.poole.openinghoursparser
Class Util
java.lang.Object
ch.poole.openinghoursparser.Util
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String s) Capitalize a stringstatic @Nullable StringConvert two letter German weekdays to our standardstatic booleanReturnstrueif the arguments are equal to each other andfalseotherwise.getMergeableRules(List<Rule> rules) find rules that only differs in the days and times objects and can be merged for display puposesstatic StringrulesToOpeningHoursDebugString(@NotNull List<Rule> rules) Generate a debugging output string from rulesstatic StringrulesToOpeningHoursString(@NotNull List<Rule> rules) Generate an OH string from rules
-
Method Details
-
getMergeableRules
find rules that only differs in the days and times objects and can be merged for display puposes- Parameters:
rules- rules to check- Returns:
- list of list of rules that can be merged
-
rulesToOpeningHoursString
Generate an OH string from rules- Parameters:
rules- rules to convert to an opening_hours string- Returns:
- specification conformant opening_hours string
-
rulesToOpeningHoursDebugString
Generate a debugging output string from rules- Parameters:
rules- rules to convert to an opening_hours string- Returns:
- specification debugging opening_hours string
-
capitalize
Capitalize a string- Parameters:
s- string to capitalize- Returns:
- capitalized string
-
deWeekDays2En
Convert two letter German weekdays to our standard- Parameters:
s- the String with the German weekday- Returns:
- the standard weekday string
-
equals
Returnstrueif the arguments are equal to each other andfalseotherwise.- Parameters:
a- the first objectb- the second object- Returns:
- true if the arguments are equal
- See Also:
-