Class PropUtil

    • Constructor Detail

      • PropUtil

        public PropUtil()
    • Method Detail

      • getProperties

        public static Properties getProperties​(List<String> propList)
        Convert from a List of properties stored as name:value pairs to a Properties.
        Parameters:
        propList - contains a list of name-value pairs separated by a ':'.
        Returns:
        reference to a Properties collection.
      • getProperties

        public static Properties getProperties​(List<String> propList,
                                               char separator)
        Convert from a List of properties stored as name:value pairs to a Properties.
        Parameters:
        propList - contains a list of name-value pairs separated by a ':'.
        separator - contains char to be used to separate key and value.
        Returns:
        reference to a Properties collection.
      • getProperties

        public static Properties getProperties​(String inputString)
        Convert from a comma delimited list of name-value pairs separated by a ':'. Return the pros as Properties.
        Parameters:
        inputString - contains comma delimited list of properties.
        Returns:
        java collection class containing props.
      • getProperties

        public static Properties getProperties​(String inputString,
                                               char separator)
        Convert from a comma delimited list of name-value pairs separated by a ':'. Return the pros as Properties.
        Parameters:
        inputString - contains comma delimited list of properties.
        separator - contains char to be used to separate key and value.
        Returns:
        java collection class containing props.
      • getProperties

        public static Properties getProperties​(String inputString,
                                               char separator,
                                               String delimiter)
        Convert from a comma delimited list of name-value pairs separated by a ':'. Return the pros as Properties.
        Parameters:
        inputString - contains comma delimited list of properties.
        separator - contains char to be used to separate key and value.
        delimiter - contains a single char specifying delimiter between properties.
        Returns:
        java collection class containing props.
      • isNotEmpty

        public static boolean isNotEmpty​(Properties props)
        Method will return true if props is not null or empty.
        Parameters:
        props - contains the reference to props.
        Returns:
        boolean if validation succeeds.