Package io.github.jonestimd.util
Class Resources
- java.lang.Object
-
- io.github.jonestimd.util.Resources
-
public class Resources extends java.lang.Object
Utility methods for accessing resource bundles.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.Map<java.lang.String,T>
asMap(java.util.ResourceBundle bundle, java.lang.String keyPrefix, java.util.function.Function<java.lang.Object,T> converter)
Get a subset of resources as aMap
.static java.lang.String
join(java.util.ResourceBundle bundle, java.lang.String prefix)
Combine a subset of resources into a string.
-
-
-
Method Detail
-
asMap
public static <T> java.util.Map<java.lang.String,T> asMap(java.util.ResourceBundle bundle, java.lang.String keyPrefix, java.util.function.Function<java.lang.Object,T> converter)
Get a subset of resources as aMap
.
-
join
public static java.lang.String join(java.util.ResourceBundle bundle, java.lang.String prefix)
Combine a subset of resources into a string. The resources are converted to strings usingtoString()
and concatenated in the alphabetical order of their keys.
-
-