Class CollectionUtils

java.lang.Object
com.sun.enterprise.universal.collections.CollectionUtils

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

    • propertiesToStringMap

      public static Map<String,String> propertiesToStringMap(Properties p)
      Convert a Properties object, which is a Map<Object,Object> into a invalid input: '<'codeinvalid input: '<'Map<String,String>
      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
    • toStringArray

      public static String[] toStringArray(Map<String,String> map)