Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jexl3.internal
Class MapBuilder

    java.lang.Object
      org.apache.commons.jexl3.internal.MapBuilder

All Implemented Interfaces:
  JexlArithmetic.MapBuilder

    public class MapBuilder

extends Object
implements JexlArithmetic.MapBuilder

Helper class to create map literals.

Field Summary
`protected Map<Object,Object>` | `map` The map being created.

Constructor Summary
`MapBuilder(int size)` Creates a new builder.

Method Summary
`Object` | `create()` Creates the actual "map" instance.
`void` | `put(Object key, Object value)` Adds a new entry to the map.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### map

    protected final Map<Object,Object> map

  The map being created.

Constructor Detail

### MapBuilder

    public MapBuilder(int size)

  Creates a new builder.

  Parameters:
    `size` - the expected map size

Method Detail

### put

    public void put(Object key,
                    Object value)

  Description copied from interface: `JexlArithmetic.MapBuilder`
  Adds a new entry to the map.

  Specified by:
    `put` in interface `JexlArithmetic.MapBuilder`
  Parameters:
    `key` - the map entry key
    `value` - the map entry value

### create

    public Object create()

  Description copied from interface: `JexlArithmetic.MapBuilder`
  Creates the actual "map" instance.

  Specified by:
    `create` in interface `JexlArithmetic.MapBuilder`
  Returns:
    the map

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.