public class ApiResponseSet extends ApiResponse
Constructor and Description |
---|
ApiResponseSet(org.w3c.dom.Node node) |
ApiResponseSet(java.lang.String name,
java.util.Map<java.lang.String,ApiResponse> values) |
ApiResponseSet(java.lang.String name,
java.lang.String[] attributes)
Deprecated.
(1.1.0) Unused, there's no replacement.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute(java.lang.String key)
Deprecated.
(1.1.0) Use
getStringValue(String) or getValue(String) instead. |
java.lang.String[] |
getAttributes()
Deprecated.
(1.1.0) Unused, there's no replacement.
|
java.util.Set<java.lang.String> |
getKeys()
Gets the keys of the values.
|
java.lang.String |
getStringValue(java.lang.String key)
Gets the value for the given
key as String . |
ApiResponse |
getValue(java.lang.String key)
Gets the value for the given
key . |
java.util.Collection<ApiResponse> |
getValues()
Gets the values.
|
java.util.Map<java.lang.String,ApiResponse> |
getValuesMap()
Gets a
Map with the keys and values. |
java.lang.String |
toString(int indent) |
getName, setName
@Deprecated public ApiResponseSet(java.lang.String name, java.lang.String[] attributes)
ApiResponseSet
with the given name and attributes.name
- the name of the API responseattributes
- the attributespublic ApiResponseSet(java.lang.String name, java.util.Map<java.lang.String,ApiResponse> values)
public ApiResponseSet(org.w3c.dom.Node node) throws ClientApiException
ClientApiException
@Deprecated public java.lang.String[] getAttributes()
null
.getValues()
@Deprecated public java.lang.String getAttribute(java.lang.String key)
getStringValue(String)
or getValue(String)
instead.key
.key
- the key of the valuenull
if no value exists for the given key
.public ApiResponse getValue(java.lang.String key)
key
.key
- the key of the valuenull
if no value exists for the given key
.getKeys()
,
getStringValue(String)
public java.lang.String getStringValue(java.lang.String key)
key
as String
.
For ApiResponseElement
s it returns its
value
, for other ApiResponse
types it returns the conversion to String
.
key
- the key of the valuenull
if no value exists for the given key
.getKeys()
,
getValue(String)
public java.util.Map<java.lang.String,ApiResponse> getValuesMap()
Map
with the keys and values.
The returned Map
is unmodifiable, any attempt to modify it will result in an
UnsupportedOperationException
.
null
.public java.util.Set<java.lang.String> getKeys()
The returned Set
is unmodifiable, any attempt to modify it will result in an
UnsupportedOperationException
.
null
.getValue(String)
,
getStringValue(String)
,
getValues()
,
getValuesMap()
public java.util.Collection<ApiResponse> getValues()
The returned Collection
is unmodifiable, any attempt to modify it will result in
an UnsupportedOperationException
.
null
.getValue(String)
,
getStringValue(String)
public java.lang.String toString(int indent)
toString
in class ApiResponse