Class MapBuilder
- java.lang.Object
-
- org.apache.commons.jexl3.internal.MapBuilder
-
- All Implemented Interfaces:
JexlArithmetic.MapBuilder
public class MapBuilder extends java.lang.Object implements JexlArithmetic.MapBuilder
Helper class to create map literals.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Object,java.lang.Object>mapThe map being created.
-
Constructor Summary
Constructors Constructor Description MapBuilder(int size)Creates a new builder.MapBuilder(int size, boolean extended)Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Object,java.lang.Object>create()Creates the actual "map" instance.voidput(java.lang.Object key, java.lang.Object value)Adds a new entry to the map.
-
-
-
Method Detail
-
create
public java.util.Map<java.lang.Object,java.lang.Object> create()
Description copied from interface:JexlArithmetic.MapBuilderCreates the actual "map" instance.- Specified by:
createin interfaceJexlArithmetic.MapBuilder- Returns:
- the map
-
put
public void put(java.lang.Object key, java.lang.Object value)Description copied from interface:JexlArithmetic.MapBuilderAdds a new entry to the map.- Specified by:
putin interfaceJexlArithmetic.MapBuilder- Parameters:
key- the map entry keyvalue- the map entry value
-
-