Class ResponseModel
- java.lang.Object
-
- com.github.dannil.scbjavaclient.model.ResponseModel
-
public class ResponseModel extends Object
Class which encapsulates data retrieved from the API.
- Since:
- 0.3.0
-
-
Constructor Summary
Constructors Constructor Description ResponseModel()
Default constructor.ResponseModel(Map<String,String> variables, Collection<ValueNode<String>> values)
Overloaded constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
setVariables
public void setVariables(Map<String,String> variables)
Setter for variables.
- Parameters:
variables
- the variables
-
getValues
public Collection<ValueNode<String>> getValues()
Getter for values.
- Returns:
- the values
-
setValues
public void setValues(Collection<ValueNode<String>> values)
Setter for values.
- Parameters:
values
- the values
-
getVariable
public String getVariable(String key)
Get the variable value for a specific key.
- Parameters:
key
- the key- Returns:
- the value
-
setVariable
public void setVariable(String key, String value)
Set the variable value for a specific key.
- Parameters:
key
- the keyvalue
- the value
-
getValue
public ValueNode<String> getValue(String code)
Get the value node for a specific contents code.
-
setValue
public void setValue(String code, String value)
Set the value for a specific contents code.
- Parameters:
code
- the contents code to set the value forvalue
- the value
-
-