Class MapBuilder
java.lang.Object
org.apache.commons.jexl3.internal.MapBuilder
- All Implemented Interfaces:
JexlArithmetic.MapBuilder
Helper class to create map literals.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMapBuilder(int size) Creates a new builder.MapBuilder(int size, boolean extended) Creates a new builder. -
Method Summary
-
Field Details
-
map
The map being created.
-
-
Constructor Details
-
MapBuilder
public MapBuilder(int size) Creates a new builder.- Parameters:
size- the expected map size
-
MapBuilder
public MapBuilder(int size, boolean extended) Creates a new builder.- Parameters:
size- the expected map sizeextended- whether the map is extended
-
-
Method Details
-
create
Description copied from interface:JexlArithmetic.MapBuilderCreates the actual "map" instance.- Specified by:
createin interfaceJexlArithmetic.MapBuilder- Returns:
- the map
-
put
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
-