public class StringPropertiesUtils extends Object
Constructor and Description |
---|
StringPropertiesUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
convertPropertiesToMapStringString(Properties properties2) |
static String[] |
getArgumentsArray(Map<String,String> properties,
String key,
String[] defaultValue) |
static String[] |
getArray(Map<String,String> properties,
String key,
String separator,
String[] defaultValue) |
static boolean |
getBoolean(Map<String,String> properties,
String key,
boolean defaultValue) |
static Object |
getConfig(Map<String,String> properties,
String key,
Object defaultValue)
Gets an object that has a constructor that accepts Map
|
static double |
getDouble(Map<String,String> properties,
String key,
double defaultValue) |
static double |
getDoubleIgnoreExceptions(Map<String,String> properties,
String key,
double defaultValue) |
static int |
getInteger(Map<String,String> properties,
String key,
int defaultValue) |
static int |
getIntegerIgnoreExceptions(Map<String,String> properties,
String key,
int defaultValue) |
static Map<String,String> |
getKeyValuePairs(Map<String,String> properties,
String key,
String pairSeperator,
String keyValueSeperator,
Map<String,String> defaultValue) |
static long |
getLong(Map<String,String> properties,
String key,
long defaultValue) |
static long |
getLongIgnoreExceptions(Map<String,String> properties,
String key,
long defaultValue) |
static Map<String,String> |
getMap(Map<String,String> properties,
String keyPrefix,
Map<String,String> defaultValue) |
static Set<String> |
getSet(Map<String,String> properties,
String key,
String separator,
Set<String> defaultValue) |
static Object |
getStringWrapperObject(Map<String,String> properties,
String key,
Object defaultValue)
Gets an object that has a constructor that accepts String as a single argument
|
static Map<String,String> |
load(InputStream in) |
static Map<String,String> |
load(String filename) |
static void |
putArgumentsArray(Map<String,String> properties,
String key,
String[] array)
Concatenates the specified array into a combined string using the space separator and puts
the result as a value into the specified properties with the specified key.
|
static void |
putArray(Map<String,String> properties,
String key,
String[] array,
String separator)
Concatenates the specified array into a combined string using the specified separator and
puts the result as a value into the specified properties with the specified key.
|
static void |
putBoolean(Map<String,String> properties,
String key,
boolean value) |
static void |
putConfig(Map<String,String> properties,
String key,
Object object)
Puts an object that has a constructor that accepts Map
|
static void |
putDouble(Map<String,String> properties,
String key,
double value) |
static void |
putInteger(Map<String,String> properties,
String key,
int value) |
static void |
putKeyValuePairs(Map<String,String> properties,
String key,
Map<String,String> value,
String pairSeperator,
String keyValueSeperator) |
static void |
putLong(Map<String,String> properties,
String key,
long value) |
static void |
putMap(Map<String,String> properties,
String keyPrefix,
Map<String,String> value)
Puts the map as a value by adding the specified prefix to each key If value is null the
object is removed from properties.
|
static void |
putSet(Map<String,String> properties,
String key,
Set<String> value,
String separator) |
static void |
putStringWrapperObject(Map<String,String> properties,
String key,
Object value)
Puts an object that has a constructor that accepts String as a single argument
|
static void |
store(Map<String,String> properties,
OutputStream out,
String comments) |
static String |
toString(Map<String,String> properties) |
public static void store(Map<String,String> properties, OutputStream out, String comments) throws IOException
IOException
public static Map<String,String> load(InputStream in) throws IOException
IOException
public static Map<String,String> convertPropertiesToMapStringString(Properties properties2)
public static Map<String,String> load(String filename) throws IOException
IOException
public static int getInteger(Map<String,String> properties, String key, int defaultValue) throws NumberFormatException
NumberFormatException
public static int getIntegerIgnoreExceptions(Map<String,String> properties, String key, int defaultValue)
public static long getLong(Map<String,String> properties, String key, long defaultValue) throws NumberFormatException
NumberFormatException
public static long getLongIgnoreExceptions(Map<String,String> properties, String key, long defaultValue)
public static double getDouble(Map<String,String> properties, String key, double defaultValue) throws NumberFormatException
NumberFormatException
public static double getDoubleIgnoreExceptions(Map<String,String> properties, String key, double defaultValue)
public static void putArray(Map<String,String> properties, String key, String[] array, String separator)
public static String[] getArray(Map<String,String> properties, String key, String separator, String[] defaultValue)
public static Set<String> getSet(Map<String,String> properties, String key, String separator, Set<String> defaultValue)
public static void putSet(Map<String,String> properties, String key, Set<String> value, String separator)
public static void putArgumentsArray(Map<String,String> properties, String key, String[] array)
public static String[] getArgumentsArray(Map<String,String> properties, String key, String[] defaultValue)
public static boolean getBoolean(Map<String,String> properties, String key, boolean defaultValue)
public static Map<String,String> getMap(Map<String,String> properties, String keyPrefix, Map<String,String> defaultValue)
public static void putMap(Map<String,String> properties, String keyPrefix, Map<String,String> value)
public static void putKeyValuePairs(Map<String,String> properties, String key, Map<String,String> value, String pairSeperator, String keyValueSeperator)
public static Map<String,String> getKeyValuePairs(Map<String,String> properties, String key, String pairSeperator, String keyValueSeperator, Map<String,String> defaultValue)
public static void putConfig(Map<String,String> properties, String key, Object object)
public static Object getConfig(Map<String,String> properties, String key, Object defaultValue)
public static void putStringWrapperObject(Map<String,String> properties, String key, Object value)
Copyright © GigaSpaces.