org.constretto.internal
Class ConstrettoUtils

java.lang.Object
  extended by org.constretto.internal.ConstrettoUtils

public class ConstrettoUtils
extends Object

Author:
Kaare Nilsen

Constructor Summary
ConstrettoUtils()
           
 
Method Summary
static String asCsv(String[] arr)
           
static List<String> fromCSV(String csv)
           
static boolean isEmpty(String string)
           
static void mergePropertiesIntoMap(Properties props, Map map)
          Merge the given Properties instance into the given Map, copying all properties (key-value pairs) over.
static String substringAfter(String str, String separator)
           
static String substringBetween(String str, String open, String close)
           
static Locale toLocale(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstrettoUtils

public ConstrettoUtils()
Method Detail

asCsv

public static String asCsv(String[] arr)

fromCSV

public static List<String> fromCSV(String csv)

isEmpty

public static boolean isEmpty(String string)

substringBetween

public static String substringBetween(String str,
                                      String open,
                                      String close)

substringAfter

public static String substringAfter(String str,
                                    String separator)

toLocale

public static Locale toLocale(String str)

mergePropertiesIntoMap

public static void mergePropertiesIntoMap(Properties props,
                                          Map map)
Merge the given Properties instance into the given Map, copying all properties (key-value pairs) over.

Uses Properties.propertyNames() to even catch default properties linked into the original Properties instance.

Parameters:
props - the Properties instance to merge (may be null)
map - the target Map to merge the properties into


Copyright © 2008-2013. All Rights Reserved.