Class ConverterUtil
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 LocalDatetoLocalDate(Date _date) static LocalDateTimetoLocalDateTime(Date _date) Converts aDateto aLocalDateTimeusing the default timezone.static LocalTimetoLocalTime(Date _date) static PropertiestoProperties(Map<?, ?> _map) Convertes a map to a Properties object.
-
Method Details
-
strToInt
-
strToInt
-
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
-
toLocalDateTime
Converts aDateto aLocalDateTimeusing the default timezone.- Parameters:
_date- date to convert- Returns:
- LocalDateTime or null if input null
-
toLocalDate
-
toLocalTime
-