public class ResponseModel extends Object
Class which encapsulates data retrieved from the API.
Constructor and Description |
---|
ResponseModel()
Default constructor.
|
ResponseModel(Map<String,String> variables,
Collection<ValueNode<String>> values)
Overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ValueNode<String> |
getValue(String code)
Get the value node for a specific contents code.
|
Collection<ValueNode<String>> |
getValues()
Getter for values.
|
String |
getVariable(String key)
Get the variable value for a specific key.
|
Map<String,String> |
getVariables()
Getter for variables.
|
int |
hashCode() |
void |
setValue(String code,
String value)
Set the value for a specific contents code.
|
void |
setValues(Collection<ValueNode<String>> values)
Setter for values.
|
void |
setVariable(String key,
String value)
Set the variable value for a specific key.
|
void |
setVariables(Map<String,String> variables)
Setter for variables.
|
String |
toString() |
public void setVariables(Map<String,String> variables)
Setter for variables.
variables
- the variablespublic Collection<ValueNode<String>> getValues()
Getter for values.
public void setValues(Collection<ValueNode<String>> values)
Setter for values.
values
- the valuespublic String getVariable(String key)
Get the variable value for a specific key.
key
- the keypublic void setVariable(String key, String value)
Set the variable value for a specific key.
key
- the keyvalue
- the valuepublic ValueNode<String> getValue(String code)
Get the value node for a specific contents code.
public void setValue(String code, String value)
Set the value for a specific contents code.
code
- the contents code to set the value forvalue
- the valueCopyright © 2017. All rights reserved.