public final class MapLiteral extends Object implements ExpressionNode
Constructor and Description |
---|
MapLiteral(Map<String,ExpressionNode> map)
Creates a map representation.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(NodeVisitor<T> visitor)
Accept a visitor to process this node.
|
boolean |
containsKey(String name)
Checks if the map contains the property identified by the passed property name.
|
Map<String,ExpressionNode> |
getMap()
Returns an unmodifiable view of the backing map.
|
ExpressionNode |
getValue(String key)
Returns an
ExpressionNode from the backing map. |
String |
toString() |
public MapLiteral(Map<String,ExpressionNode> map)
map
- the backing ExpressionNode
mappublic Map<String,ExpressionNode> getMap()
public ExpressionNode getValue(String key)
ExpressionNode
from the backing map.key
- the key under which the node is storednull
otherwisepublic boolean containsKey(String name)
name
- the property nametrue
if the map contains the property, false
otherwisepublic <T> T accept(NodeVisitor<T> visitor)
ExpressionNode
accept
in interface ExpressionNode
T
- the type of the visitorvisitor
- The visitorCopyright © 2017 The Apache Software Foundation. All rights reserved.