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, wrappublic 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 TemplateNodeModelTemplateModelExceptionpublic String getNodeType() throws TemplateModelException
NODE_TYPE.getNodeType in interface TemplateNodeModelTemplateModelExceptionpublic 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 TemplateSequenceModelTemplateModelExceptionpublic int size()
throws TemplateModelException
size in interface TemplateSequenceModelTemplateModelExceptionprotected String getDefaultNodeName()
JSONNodeJSONNode.JSONNode(JSONNode, String) constructor if its second argument is null.getDefaultNodeName in class JSONNodeJSONNode.nodeTypeToDefaultNodeName(String)