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 booleanequals(Object obj)ValueNode<String>getValue(String code)Get the value node for a specific contents code.Collection<ValueNode<String>>getValues()Getter for values.StringgetVariable(String key)Get the variable value for a specific key.Map<String,String>getVariables()Getter for variables.inthashCode()voidsetValue(String code, String value)Set the value for a specific contents code.voidsetValues(Collection<ValueNode<String>> values)Setter for values.voidsetVariable(String key, String value)Set the variable value for a specific key.voidsetVariables(Map<String,String> variables)Setter for variables.StringtoString()
-
-
-
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
-
-