java.lang.Object
com.github.hypfvieh.util.ConverterUtil
Utility class for converting types (e.g. String to Integer).
- Since:
- v1.0 - 2016-07-08
- Author:
- hypfvieh
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns true if string matches certain boolean values.static IntegerConvert given String to Integer, returns null if String is not an integer.static IntegerConvert given String to Integer, returns _default if String is not an integer.static PropertiestoProperties(Map<?, ?> _map) Convertes a map to a Properties object.
-
Method Details
-
strToInt
Convert given String to Integer, returns _default if String is not an integer.- Parameters:
_str-_default-- Returns:
- _str as Integer or _default value
-
strToInt
Convert given String to Integer, returns null if String is not an integer.- Parameters:
_str-- Returns:
- _str as Integer or null
-
strToBool
Returns true if string matches certain boolean values.- Parameters:
_str-- Returns:
-
toProperties
Convertes a map to a Properties object.- Parameters:
_map-- Returns:
- Properties object
-