public class RoblocksEncDec extends java.lang.Object implements IRoblocksEncoder, IRoblocksDecoder
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<ToolboxFragment> |
toolboxFragments |
Constructor and Description |
---|
RoblocksEncDec(java.util.ArrayList<ToolboxFragment> toolboxFragments)
Construct a RoblocksEncDec.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<VisualEditFragment> |
decode(java.lang.String jsonString)
Decode a JSON String to an ArrayList of VisualEditFragments.
|
org.json.simple.JSONObject |
encode(java.util.ArrayList<VisualEditFragment> visualEditFragmentList)
Encode an ArrayList of VisualEditFragments to a JSON String.
|
public final java.util.ArrayList<ToolboxFragment> toolboxFragments
public RoblocksEncDec(java.util.ArrayList<ToolboxFragment> toolboxFragments)
toolboxFragments
- New ArrayList which already contains or can contain the ToolboxFragments.public java.util.ArrayList<VisualEditFragment> decode(java.lang.String jsonString)
decode
in interface IRoblocksDecoder
jsonString
- JSON-data.public org.json.simple.JSONObject encode(java.util.ArrayList<VisualEditFragment> visualEditFragmentList)
encode
in interface IRoblocksEncoder
visualEditFragmentList
- List of VisualEditFragments.