java.lang.Object
de.focus_shift.jollyday.core.util.ResourceUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull StringgetCountryDescription(@NonNull String key) getCountryDescription.static @NonNull StringgetCountryDescription(@NonNull Locale locale, @Nullable String key) Returns the hierarchies description text from the resource bundle.static @NonNull StringgetHolidayDescription(@NonNull String key) The description read with the default locale.static @NonNull StringgetHolidayDescription(@NonNull Locale locale, @NonNull String key) The description read with the provided locale.getResource(@NonNull String resourceName) Returns the resource by URL.getResource(@NonNull String resourceName, boolean searchOnlyInJar) Returns the resource by URL.
-
Field Details
-
UNDEFINED
Unknown constant will be returned when there is no description configured.- See Also:
-
-
Method Details
-
getHolidayDescription
The description read with the default locale.- Parameters:
key- aStringobject.- Returns:
- holiday description using default locale.
-
getHolidayDescription
The description read with the provided locale. -
getCountryDescription
getCountryDescription.
- Parameters:
key- aStringobject.- Returns:
- the description
-
getCountryDescription
Returns the hierarchies description text from the resource bundle.- Parameters:
locale- Locale to return the description text for.key- aStringobject.- Returns:
- Description text
-
getResource
Returns the resource by URL.- Parameters:
resourceName- the name/path of the resource to load- Returns:
- the URL to the resource
-
getResource
public static @NonNull Optional<URL> getResource(@NonNull String resourceName, boolean searchOnlyInJar) Returns the resource by URL.- Parameters:
resourceName- the name/path of the resource to loadsearchOnlyInJar- if true searches for the given resourceName only in resource with the protocol 'jar' otherwise the protocol is irrelevant- Returns:
- the optional URL to the resource
-