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()
IJsonTableFormatExtracts the codes and their respective values from the JSON.
getInputs in interface IJsonTableFormatpublic List<String> getCodes()
IJsonTableFormatExtracts the codes from the JSON.
getCodes in interface IJsonTableFormatpublic List<String> getValues(String code)
IJsonTableFormatExtracts the values for a code from the JSON.
getValues in interface IJsonTableFormatcode - the codeCopyright © 2016. All rights reserved.