public final class MapHelper
extends java.lang.Object
This class will be deprecated in a future release; we recommend using the MapExtractor
class for this purpose instead.
MapExtractor| Modifier and Type | Method and Description |
|---|---|
static boolean |
getBoolean(java.util.Map<?,?> map,
java.lang.String key)
Get a boolean value from the specified map, throwing an exception if it is not present.
|
static boolean |
getBoolean(java.util.Map<?,?> map,
java.lang.String key,
boolean defaultValue)
Get a boolean value from the specified map, returning a specified default value if it is not present.
|
static double |
getDouble(java.util.Map<?,?> map,
java.lang.String key)
Get a double value from the specified map, throwing an exception if it is not present.
|
static double |
getDouble(java.util.Map<?,?> map,
java.lang.String key,
double defaultValue)
Get a double value from the specified map, returning a specified default value if it is not present.
|
static long |
getInteger(java.util.Map<?,?> map,
java.lang.String key)
Get a long value from the specified map, throwing an exception if it is not present.
|
static long |
getInteger(java.util.Map<?,?> map,
java.lang.String key,
long defaultValue)
Get a long value from the specified map, returning a specified default value if it is not present.
|
static java.util.List<java.lang.Object> |
getList(java.util.Map<?,?> map,
java.lang.String key)
Get a List value from the specified map, throwing an exception if it is not present.
|
static java.util.List<java.lang.Object> |
getList(java.util.Map<?,?> map,
java.lang.String key,
java.util.List<?> defaultValue)
Get a List value from the specified map, returning a specified default value if it is not present.
|
static java.util.Map<java.lang.Object,java.lang.Object> |
getMap(java.util.Map<?,?> map,
java.lang.String key)
Get a Map value from the specified map, throwing an exception if it is not present.
|
static java.util.Map<java.lang.Object,java.lang.Object> |
getMap(java.util.Map<?,?> map,
java.lang.String key,
java.util.Map<?,?> defaultValue)
Get a Map value from the specified map, returning a specified default value if it is not present.
|
static java.lang.String |
getString(java.util.Map<?,?> map,
java.lang.String key)
Get a String value from the specified map, throwing an exception if it is not present.
|
static java.lang.String |
getString(java.util.Map<?,?> map,
java.lang.String key,
java.lang.String defaultValue)
Get a String value from the specified map, returning a specified default value if it is not present.
|
public static java.lang.String getString(java.util.Map<?,?> map,
java.lang.String key,
java.lang.String defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static java.lang.String getString(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static boolean getBoolean(java.util.Map<?,?> map,
java.lang.String key,
boolean defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static boolean getBoolean(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static long getInteger(java.util.Map<?,?> map,
java.lang.String key,
long defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static long getInteger(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static double getDouble(java.util.Map<?,?> map,
java.lang.String key,
double defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static double getDouble(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static java.util.Map<java.lang.Object,java.lang.Object> getMap(java.util.Map<?,?> map,
java.lang.String key,
java.util.Map<?,?> defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static java.util.Map<java.lang.Object,java.lang.Object> getMap(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static java.util.List<java.lang.Object> getList(java.util.Map<?,?> map,
java.lang.String key,
java.util.List<?> defaultValue)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionpublic static java.util.List<java.lang.Object> getList(java.util.Map<?,?> map,
java.lang.String key)
throws java.lang.IllegalArgumentException
map - May be nullkey - java.lang.IllegalArgumentExceptionSubmit a bug or feature
Copyright (c) 2013-2017 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.