public class Wrapper extends Object
Map.
We use wrapper classes instead of just passing around plain Maps because
Client and Channel)null each time| Constructor and Description |
|---|
Wrapper(Map<String,String> map)
Creates a new wrapper around the given map.
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(Property property)
Gets a property as a
String from the underlying map. |
String |
get(String propertyName)
Gets a property as a String from the underlying map.
|
boolean |
getBoolean(Property property)
Gets a property as a boolean from the underlying map.
|
boolean |
getBoolean(String propertyName)
Gets a property as a boolean from the underlying map.
|
double |
getDouble(Property property)
Gets a property as a double from the underlying map.
|
double |
getDouble(String propertyName)
Gets a property as a double from the underlying map.
|
int |
getInt(Property property)
Gets a property as an integer from the underlying map.
|
int |
getInt(String propertyName)
Gets a property as an integer from the underlying map.
|
long |
getLong(Property property)
Gets a property as a long from the underlying map.
|
long |
getLong(String propertyName)
Gets a property as a long from the underlying map.
|
Map<String,String> |
getMap()
Gets the map underlying this
Wrapper. |
String |
toString() |
public Map<String,String> getMap()
Wrapper.public boolean getBoolean(String propertyName)
true if the property exists in the map and its value is "1".propertyName - the name of the propertyfalse if the property doesn't existpublic boolean getBoolean(Property property)
true if the property exists in the map and its value is "1".property - the propertyfalse if the property doesn't existpublic double getDouble(String propertyName)
-1.0 is returned.propertyName - the name of the property-1.0 if the property doesn't existpublic double getDouble(Property property)
-1.0 is returned.property - the property-1.0 if the property doesn't existpublic long getLong(String propertyName)
-1 is returned.propertyName - the name of the property-1 if the property doesn't existpublic long getLong(Property property)
-1 is returned.property - the property-1 if the property doesn't existpublic int getInt(String propertyName)
-1 is returned.propertyName - the name of the property-1 if the property doesn't existpublic int getInt(Property property)
-1 is returned.property - the property-1 if the property doesn't existpublic String get(String propertyName)
propertyName - the name of the propertypublic String get(Property property)
String from the underlying map.
If the property doesn't exist in the underlying map, an empty String is returned.property - the propertyCopyright © 2015. All rights reserved.