public class JsonAPITableFormat extends Object implements IJsonTableFormat
Class which encapsulates behavior for the JSON API table format. Note that this class is immutable; to change the containing JSON, a new class needs to be instantiated.
Constructor and Description |
---|
JsonAPITableFormat(String json)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getCodes()
Extracts the codes from the JSON.
|
Map<String,Collection<String>> |
getInputs()
Extracts the codes and their respective values from the JSON.
|
List<String> |
getValues(String code)
Extracts the values for a code from the JSON.
|
String |
toString() |
public JsonAPITableFormat(String json)
Default constructor.
json
- the json to formatpublic Map<String,Collection<String>> getInputs()
IJsonTableFormat
Extracts the codes and their respective values from the JSON.
getInputs
in interface IJsonTableFormat
public List<String> getCodes()
IJsonTableFormat
Extracts the codes from the JSON.
getCodes
in interface IJsonTableFormat
public List<String> getValues(String code)
IJsonTableFormat
Extracts the values for a code from the JSON.
getValues
in interface IJsonTableFormat
code
- the codeCopyright © 2016. All rights reserved.