public class PropertyMap extends Object
Holds properties represented as key/value pairs of type String/String. The APIs are targeted towards the usage of PropertyNames as input parameters.
| Modifier and Type | Class and Description |
|---|---|
static class |
PropertyMap.Builder
Builder for a PropertyMap instance.
|
| Modifier and Type | Method and Description |
|---|---|
static PropertyMap.Builder |
builder()
Creates a builder for a new PropertyMap instance.
|
static PropertyMap.Builder |
builder(PropertyMap template)
Creates a builder for a new PropertyMap instance and applies the given template.
|
Map<String,String> |
getProperties()
Returns the held properties represented as key/value pairs.
|
static PropertyMap |
of()
Creates an empty PropertyMap.
|
static <V> PropertyMap |
of(PropertyName<V> name,
V value)
Creates a new PropertyMap with a single entry based on the given name and value.
|
static <V1,V2> PropertyMap |
of(PropertyName<V1> name1,
V1 value1,
PropertyName<V2> name2,
V2 value2)
Creates a new PropertyMap with two entries based on the given sequence of name/value.
|
static <V1,V2,V3> PropertyMap |
of(PropertyName<V1> name1,
V1 value1,
PropertyName<V2> name2,
V2 value2,
PropertyName<V3> name3,
V3 value3)
Creates a new PropertyMap with three entries based on the given sequence of name/value.
|
public Map<String,String> getProperties()
Returns the held properties represented as key/value pairs.
public static PropertyMap of()
Creates an empty PropertyMap.
public static <V> PropertyMap of(PropertyName<V> name, V value)
Creates a new PropertyMap with a single entry based on the given name and value.
V - the expected transient type of the valuename - the name of the propertyvalue - the value of the propertypublic static <V1,V2> PropertyMap of(PropertyName<V1> name1, V1 value1, PropertyName<V2> name2, V2 value2)
Creates a new PropertyMap with two entries based on the given sequence of name/value.
V1 - the expected transient type of the first valueV2 - the expected transient type of the second valuename1 - the name of the first propertyvalue1 - the value of the first propertyname2 - the name of the second propertyvalue2 - the value of the second propertypublic static <V1,V2,V3> PropertyMap of(PropertyName<V1> name1, V1 value1, PropertyName<V2> name2, V2 value2, PropertyName<V3> name3, V3 value3)
Creates a new PropertyMap with three entries based on the given sequence of name/value.
V1 - the expected transient type of the first valueV2 - the expected transient type of the second valueV3 - the expected transient type of the third valuename1 - the name of the first propertyvalue1 - the value of the first propertyname2 - the name of the second propertyvalue2 - the value of the second propertyname3 - the name of the third propertyvalue3 - the value of the third propertypublic static PropertyMap.Builder builder()
Creates a builder for a new PropertyMap instance.
public static PropertyMap.Builder builder(PropertyMap template)
Creates a builder for a new PropertyMap instance and applies the given template.
template - the property map templateCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.