Class CollectionUtils


  • public class CollectionUtils
    extends Object
    all-static methods for handling operations with Collections
    Author:
    bnevins
    • Method Detail

      • propertiesToStringMap

        public static Map<String,​String> propertiesToStringMap​(Properties p)
        Convert a Properties object, which is a Map into a Map
        Parameters:
        p - The Properties object to convert
        Returns:
        The converted Map
      • toString

        public static String toString​(Map<String,​String> map)
        Tired of dumping a String representation of a Map? Then call me!
        Parameters:
        map - The map to turn into a printable String
        Returns:
        The pretty String
      • toString

        public static String toString​(String[] arr)
        Convert a String[] into a space-delimited String
        Parameters:
        arr - The String array to convert
        Returns:
        The pretty String
      • toStringLines

        public static String toStringLines​(String[] arr)
        Convert a String[] into a newline-delimited String
        Parameters:
        arr - The String array to convert
        Returns:
        The pretty String
      • toString

        public static String toString​(List<String> list)
        Convert a List of String into a space-delimited String
        Parameters:
        arr - The String array to convert
        Returns:
        The pretty String