public interface ServiceProperties
<service>
...
<properties>
<regularProperty>a string value</regularProperty>
<nestedProperty>
<name>arrivals</name>
<property1>value1</property1>
<property2>value1</property2>
</nestedProperty>
<nestedProperty>
<name>departures</name>
<property1>value1</property1>
<property2>value1</property2>
</nestedProperty>
</properties>
</service>
In this case, getNested("nestedProperty") returns a list containing two ServiceProperties objects, representing the
two sets of properties contained inside parent elements with that name.| Modifier and Type | Method and Description |
|---|---|
String |
get(String name) |
List<ServiceProperties> |
getNested(String name)
Returns a nested property value (list of property sets).
|
List<ServiceProperties> |
getNested(String name,
boolean create)
Returns a nested property value, optionally adding the property if it is not yet present.
|
boolean |
isEmpty() |
Iterable<String> |
nestedPropertyNames() |
void |
put(String name,
String value) |
Iterable<String> |
simplePropertyNames() |
List<ServiceProperties> getNested(String name)
#get(String, boolean) to add or alter nested properties.name - List<ServiceProperties> getNested(String name, boolean create)
name - create - If true, the nested property is created if not already present, and the
list returned is always mutable, to allow the addition or removal of property setsIterable<String> simplePropertyNames()
boolean isEmpty()
Copyright © 2014–2017. All rights reserved.