Class OceanusBundleLoader
java.lang.Object
io.github.tonywasher.joceanus.oceanus.resource.OceanusBundleLoader
Bundle Loader.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Enum<E>>
OceanusBundleIdgetKeyForEnum(Map<E, OceanusBundleId> pMap, E pValue) Obtain key for enum.static OceanusBundleLoadergetLoader(String pBundleName, Function<String, ResourceBundle> pLoader) Obtain standard loader.<K extends Enum<K> & OceanusBundleId>
StringgetValue(K pKey) Build name of resource for Key.
-
Method Details
-
getLoader
public static OceanusBundleLoader getLoader(String pBundleName, Function<String, ResourceBundle> pLoader) Obtain standard loader.- Parameters:
pBundleName- the Bundle NamepLoader- the bundle loader- Returns:
- the loader
-
getValue
Build name of resource for Key.- Type Parameters:
K- the resource key data type- Parameters:
pKey- the resource Key- Returns:
- the resourceName
-
getKeyForEnum
public static <E extends Enum<E>> OceanusBundleId getKeyForEnum(Map<E, OceanusBundleId> pMap, E pValue) Obtain key for enum.- Type Parameters:
E- the enum type- Parameters:
pMap- the mappValue- the enum value- Returns:
- the resource key
-