Package io.github.qishr.cascara.lang.json.ast
Class JsonArray
java.lang.Object
io.github.qishr.cascara.lang.json.ast.JsonNode
io.github.qishr.cascara.lang.json.ast.JsonArray
All Implemented Interfaces:
SequenceAstNode<JsonNode>
public class JsonArray
extends JsonNode
Constructor Summary
| Constructor | Description |
|---|---|
| JsonArray() | |
| JsonArray(int line, int column) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public JsonArray | add(JsonNode item) | |
| public JsonArray | remove(int index) | |
| public JsonArray | clear() | |
| public int | size() | |
| public JsonNode | get(int index) | |
| public List<JsonNode> | getElements() | |
| public List<JsonNode> | getChildren() | |
| public JsonNode | getFirst() | |
| public JsonNode | getLast() | |
| public JsonArray | remove(JsonNode node) | |
| public Iterator<JsonNode> | iterator() | Returns Iterator instance |
| public boolean | isEmpty() | |
| public boolean | equals(Object o) | |
| public int | hashCode() |
Methods inherited from JsonNode
getEndColumn, getEndLine, getComments, getStartColumn, getToken, setToken, addComment, getStartLine
Method Details
add
public JsonArray add(JsonNode item)
remove
public JsonArray remove(int index)
Specified By:
clear
public JsonArray clear()
Specified By:
size
public int size()
Specified By:
get
public JsonNode get(int index)
Specified By:
getElements
public List<JsonNode> getElements()
Specified By:
getChildren
public List<JsonNode> getChildren()
Overrides:
getFirst
public JsonNode getFirst()
Specified By:
getLast
public JsonNode getLast()
Specified By:
remove
public JsonArray remove(JsonNode node)
iterator
public Iterator<JsonNode> iterator()
Returns Iterator instance
Specified By:
isEmpty
public boolean isEmpty()
Specified By:
equals
public boolean equals(Object o)
Overrides:
hashCode
public int hashCode()
Overrides: