public class JSONArrayNode extends JSONNode implements TemplateSequenceModel
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NODE_NAME |
static String |
NODE_TYPE |
NOTHING
Constructor and Description |
---|
JSONArrayNode(JSONNode parentNode,
String nodeName,
List elements) |
Modifier and Type | Method and Description |
---|---|
TemplateModel |
get(int idx)
|
TemplateSequenceModel |
getChildNodes()
|
protected String |
getDefaultNodeName()
Returns the name of the node if it has no explicit name.
|
String |
getNodeType()
Returns
NODE_TYPE . |
int |
size() |
getNodeName, getNodeNamespace, getParentNode, nodeTypeToDefaultNodeName, wrap, wrap
public static final String NODE_TYPE
public static final String DEFAULT_NODE_NAME
public TemplateSequenceModel getChildNodes() throws TemplateModelException
JSONNode
-s in this JSON array, using a JSONNullNode
for JSON null
-s.
Note that get(int)
treats JSON null
-s differently.getChildNodes
in interface TemplateNodeModel
TemplateModelException
public String getNodeType() throws TemplateModelException
NODE_TYPE
.getNodeType
in interface TemplateNodeModel
TemplateModelException
public TemplateModel get(int idx) throws TemplateModelException
JSONNode
at the given index from this JSON array, using a Java null
for JSON
null
-s. Note that getChildNodes()
treats JSON null
-s differently.get
in interface TemplateSequenceModel
TemplateModelException
public int size() throws TemplateModelException
size
in interface TemplateSequenceModel
TemplateModelException
protected String getDefaultNodeName()
JSONNode
JSONNode.JSONNode(JSONNode, String)
constructor if its second argument is null
.getDefaultNodeName
in class JSONNode
JSONNode.nodeTypeToDefaultNodeName(String)