Package io.github.toolfactory.jvm.util
Class Properties
java.lang.Object
io.github.toolfactory.jvm.util.Properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addOtherMaps
(String propertyName, Map<BigDecimal, Properties> orderedProperties, Map<?, ?>... otherValueMaps) private static DecimalFormat
static Map
<BigDecimal, Properties> loadFromResources
(String resRelPath, String propertyName, ClassLoader... classLoaders) static Properties
loadFromResourcesAndMerge
(String resRelPath, String propertyName, Collection<ClassLoader> classLoaders, Map<?, ?>... otherMaps) static Properties
loadFromResourceWithHigherPropertyValue
(String resRelPath, String propertyName, Collection<ClassLoader> classLoaders, Map<?, ?>... otherMaps) private static void
setPriorities
(TreeMap<BigDecimal, Properties> orderedProperties, Collection<Properties> propertiesWithoutPriority, DecimalFormat decimalFormat) private static BigDecimal
stringToBigDecimal
(String value, DecimalFormat decimalFormat)
-
Constructor Details
-
Properties
public Properties()
-
-
Method Details
-
loadFromResources
public static Map<BigDecimal,Properties> loadFromResources(String resRelPath, String propertyName, ClassLoader... classLoaders) throws IOException, ParseException - Throws:
IOException
ParseException
-
loadFromResourceWithHigherPropertyValue
public static Properties loadFromResourceWithHigherPropertyValue(String resRelPath, String propertyName, Collection<ClassLoader> classLoaders, Map<?, ?>... otherMaps) throws IOException, ParseException- Throws:
IOException
ParseException
-
loadFromResourcesAndMerge
public static Properties loadFromResourcesAndMerge(String resRelPath, String propertyName, Collection<ClassLoader> classLoaders, Map<?, ?>... otherMaps) throws IOException, ParseException- Throws:
IOException
ParseException
-
addOtherMaps
private static void addOtherMaps(String propertyName, Map<BigDecimal, Properties> orderedProperties, Map<?, throws ParseException?>... otherValueMaps) - Throws:
ParseException
-
setPriorities
private static void setPriorities(TreeMap<BigDecimal, Properties> orderedProperties, Collection<Properties> propertiesWithoutPriority, DecimalFormat decimalFormat) throws ParseException- Throws:
ParseException
-
getNewDecimalFormat
-
stringToBigDecimal
private static BigDecimal stringToBigDecimal(String value, DecimalFormat decimalFormat) throws ParseException - Throws:
ParseException
-