Package com.illumon.util.calendar
Class Calendars
java.lang.Object
com.illumon.util.calendar.Calendars
- All Implemented Interfaces:
Map<String,BusinessCalendar>
A collection of business calendars.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCalendarFromFile(File file) Adds a calendar to the collection from thefilevoidaddCalendarFromFile(String filePath) Adds a calendar to the collection from thefilePathstatic BusinessCalendarcalendar()Returns a business calendar.static BusinessCalendarReturns a business calendar.static String[]Returns the names of all available calendarsvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()static StringReturns the default calendar namebooleanisEmpty()keySet()put(String key, BusinessCalendar value) voidputAll(Map<? extends String, ? extends BusinessCalendar> m) intsize()static String[]Returns the names of all user calendars, as specified by the Calendar.resourcePath propertyvalues()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
BUSINESS_CALENDAR_PROP_INTERNAL
- See Also:
-
BUSINESS_CALENDAR_PROP_USER
- See Also:
-
ABANDONED_CALENDARS
-
USER_CALENDARS
-
-
Method Details
-
calendar
Returns a business calendar.- Parameters:
name- name of the calendar- Returns:
- business calendar
- Throws:
IllegalArgumentException- no calendar matchingname
-
calendar
Returns a business calendar.- Returns:
- default business calendar. The default is specified by the
Calendar.defaultproperty.
-
getDefaultName
Returns the default calendar name- Returns:
- default business calendar name
-
calendarNames
Returns the names of all available calendars- Returns:
- names of all available calendars
-
userCalendarNames
Returns the names of all user calendars, as specified by the Calendar.resourcePath property- Returns:
- names of all user calendars
-
addCalendarFromFile
Adds a calendar to the collection from thefilePath- Parameters:
filePath- must be xml format
-
addCalendarFromFile
Adds a calendar to the collection from thefile- Parameters:
file- must be xml format
-
size
public int size()- Specified by:
sizein interfaceMap<String,BusinessCalendar>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<String,BusinessCalendar>
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,BusinessCalendar>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,BusinessCalendar>
-
get
- Specified by:
getin interfaceMap<String,BusinessCalendar>
-
put
- Specified by:
putin interfaceMap<String,BusinessCalendar>
-
remove
- Specified by:
removein interfaceMap<String,BusinessCalendar>
-
putAll
- Specified by:
putAllin interfaceMap<String,BusinessCalendar>
-
clear
public void clear()- Specified by:
clearin interfaceMap<String,BusinessCalendar>
-
keySet
- Specified by:
keySetin interfaceMap<String,BusinessCalendar>
-
values
- Specified by:
valuesin interfaceMap<String,BusinessCalendar>
-
entrySet
- Specified by:
entrySetin interfaceMap<String,BusinessCalendar>
-