Class PropertyUtils


  • public final class PropertyUtils
    extends Object

    Utility class providing handy methods to deal with Properties.

    • Method Detail

      • isPropertyTrue

        public static boolean isPropertyTrue​(Map<String,​Object> properties,
                                             String key)
        Checks whether a property with the given key exists in the given properties map and whether its value is true.
        Parameters:
        properties - The map of property objects to be checked.
        key - The key of the property to be checked.
        Returns:
        true if the property exists as Boolean or String and its value is true, false otherwise.
      • isObjectPropertyTrue

        public static boolean isObjectPropertyTrue​(Object value)
        Checks whether the given value is either of type Boolean or String and its value is true.
        Parameters:
        value - The value Object to be checked.
        Returns:
        true if the value object given as String or Boolean is true, false otherwise.