Class PropUtil
- java.lang.Object
-
- org.apache.directory.fortress.core.util.PropUtil
-
public final class PropUtil extends Object
Utilities to convert to/from property formats.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description PropUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Properties
getProperties(String inputString)
Convert from a comma delimited list of name-value pairs separated by a ':'.static Properties
getProperties(String inputString, char separator)
Convert from a comma delimited list of name-value pairs separated by a ':'.static Properties
getProperties(String inputString, char separator, String delimiter)
Convert from a comma delimited list of name-value pairs separated by a ':'.static Properties
getProperties(List<String> propList)
Convert from aList
of properties stored as name:value pairs to aProperties
.static Properties
getProperties(List<String> propList, char separator)
Convert from aList
of properties stored as name:value pairs to aProperties
.static boolean
isNotEmpty(Properties props)
Method will return true if props is not null or empty.
-
-
-
Method Detail
-
getProperties
public static Properties getProperties(List<String> propList)
Convert from aList
of properties stored as name:value pairs to aProperties
.- 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 aList
of properties stored as name:value pairs to aProperties
.- 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 asProperties
.- 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 asProperties
.- 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 asProperties
.- 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.
-
-