| java.lang.Object de.schlund.pfixcore.util.PropertiesUtils
PropertiesUtils | public class PropertiesUtils (Code) | | Insert the type's description here.
Creation date: (05/10/00 18:21:36)
author: Michael Salzmann |
Field Summary | |
final protected static Logger | LOG Logging. |
Method Summary | |
public static int | getInteger(Properties props, String key) | public static String | getString(Properties props, String key) | public static HashMap<String, String> | selectProperties(Properties props, String prefix) find all properties whose name starts with the given prefix,
strip the prefix from the name, and put them into a hashmap with
their new, shortened name. | public static TreeMap<String, String> | selectPropertiesSorted(Properties props, String prefix) Select the Properties with the given prefix and return them in a
TreeMap, using the natural Ordering.
com.sun.java.util.TreeMap. | public static TreeMap<String, String> | selectPropertiesSorted(Comparator<String> comp, Properties props, String prefix) Select the Properties with the given prefix and return them in a
TreeMap, using the given Comparator for Ordering.
If the Comparator is null, the natural Ordering is used.
com.sun.java.util.TreeMap. |
LOG | final protected static Logger LOG(Code) | | Logging.
|
PropertiesUtils | protected PropertiesUtils()(Code) | | Default constructor.
|
selectProperties | public static HashMap<String, String> selectProperties(Properties props, String prefix)(Code) | | find all properties whose name starts with the given prefix,
strip the prefix from the name, and put them into a hashmap with
their new, shortened name. Example: prefix is "foo", property name
is "foo.bar" -> will result in new property name "bar".
Creation date: (05/09/00 17:53:25)
HashMap |
selectPropertiesSorted | public static TreeMap<String, String> selectPropertiesSorted(Properties props, String prefix)(Code) | | Select the Properties with the given prefix and return them in a
TreeMap, using the natural Ordering.
com.sun.java.util.TreeMap. If prefix is null or 0 <prefix.length() return all Properties sorted. If props is nullreturn an empty TreeMap |
selectPropertiesSorted | public static TreeMap<String, String> selectPropertiesSorted(Comparator<String> comp, Properties props, String prefix)(Code) | | Select the Properties with the given prefix and return them in a
TreeMap, using the given Comparator for Ordering.
If the Comparator is null, the natural Ordering is used.
com.sun.java.util.TreeMap. If prefix is null or 0 <prefix.length() return all Properties sorted. If props is nullreturn an empty TreeMap |
|
|