Package org.apache.sling.scripting.sightly.compiler.expression.nodes

## Class MapLiteral

- java.lang.Object
- - org.apache.sling.scripting.sightly.compiler.expression.nodes.MapLiteral

All Implemented Interfaces:
  `ExpressionNode`

    public final class MapLiteral
    extends Object
    implements ExpressionNode

Defines a syntactical construction representing a map.

### Constructor Summary

Constructors
`MapLiteral​(Map<String,​ExpressionNode> map)` Creates a map representation.

### Method Summary

All Methods Instance Methods Concrete Methods
`<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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MapLiteral

    public MapLiteral​(Map<String,​ExpressionNode> map)

Creates a map representation.

Parameters:
  `map` - the backing `ExpressionNode` map

### Method Detail

#### getMap

    public Map<String,​ExpressionNode> getMap()

Returns an unmodifiable view of the backing map.

Returns:
  an unmodifiable view of the backing map

#### getValue

    public ExpressionNode getValue​(String key)

Returns an `ExpressionNode` from the backing map.

Parameters:
  `key` - the key under which the node is stored
Returns:
  the node, if one is stored under that key; `null` otherwise

#### containsKey

    public boolean containsKey​(String name)

Checks if the map contains the property identified by the passed property name.

Parameters:
  `name` - the property name
Returns:
  `true` if the map contains the property, `false` otherwise

#### accept

    public <T> T accept​(NodeVisitor<T> visitor)

Description copied from interface: `ExpressionNode`
Accept a visitor to process this node.

Specified by:
  `accept` in interface `ExpressionNode`
Type Parameters:
  `T` - the type of the visitor
Parameters:
  `visitor` - The visitor
Returns:
  the node after it has been evaluated by the visitor

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`