Package com.xebialabs.deployit.util
Class PropertyUtil
java.lang.Object
com.xebialabs.deployit.util.PropertyUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleparseDoubleSilent(Properties properties, String KEY, double defaultValue) static intparseIntSilent(Properties properties, String KEY, int defaultValue) static longparseLongSilent(Properties properties, String KEY, long defaultValue) static PropertiesreadPropertiesFile(File file) static voidstorePropertiesFile(File file, Properties properties) static voidupdateBooleanProperty(Properties properties, String key, Boolean value, Boolean initialValue, Consumer<Boolean> setter) static voidupdateDoubleProperty(Properties properties, String key, Double value, Double initialValue, Consumer<Double> setter) static voidupdateIntProperty(Properties properties, String key, Integer value, Integer initialValue, Consumer<Integer> setter) static voidupdateLongProperty(Properties properties, String key, Long value, Long initialValue, Consumer<Long> setter) static voidupdateProperty(Properties properties, String key, String value, String initialValue, Consumer<String> setter) static voidupdateProperty(Properties properties, String key, String value, Consumer<String> setter) static voidupdateProperty(Properties properties, String key, Supplier<String> getter, Supplier<String> initialValueSupplier, Consumer<String> setter)
-
Constructor Details
-
PropertyUtil
public PropertyUtil()
-
-
Method Details
-
readPropertiesFile
-
storePropertiesFile
-
parseIntSilent
-
parseDoubleSilent
-
parseLongSilent
-
updateProperty
-
updateProperty
public static void updateProperty(Properties properties, String key, String value, Consumer<String> setter) -
updateProperty
-
updateBooleanProperty
-
updateIntProperty
-
updateLongProperty
-
updateDoubleProperty
-