public class MapBuilder extends Object
Constructor and Description |
---|
MapBuilder(TimestampFormatter timestampFormatter,
Map<String,String> customFieldNames,
Map<String,Object> additionalFields,
int expectedSize) |
Modifier and Type | Method and Description |
---|---|
MapBuilder |
add(String fieldName,
boolean include,
Map<String,?> mapValue)
Adds the map to the provided map under the provided field name if it's should be included.
|
MapBuilder |
add(String fieldName,
boolean include,
String value)
Adds the string value to the provided map under the provided field name,
if it should be included.
|
MapBuilder |
add(String fieldName,
boolean include,
Supplier<String> supplier)
Adds the string value to the provided map under the provided field name,
if it should be included.
|
MapBuilder |
addMap(String fieldName,
boolean include,
Supplier<Map<String,?>> supplier)
Adds the map value to the provided map under the provided field name, if it should be
included.
|
MapBuilder |
addNumber(String fieldName,
boolean include,
Number number)
Adds the number to the provided map under the provided field name if it's should be included.
|
MapBuilder |
addNumber(String fieldName,
boolean include,
Supplier<Number> supplier)
Adds the number value to the provided map under the provided field name,
if it should be included.
|
MapBuilder |
addTimestamp(String fieldName,
boolean include,
long timestamp)
Adds and optionally formats the timestamp to the provided map under the provided field name,
if it's should be included.
|
Map<String,Object> |
build() |
public MapBuilder add(String fieldName, boolean include, @Nullable String value)
public MapBuilder add(String fieldName, boolean include, Supplier<String> supplier)
public MapBuilder addNumber(String fieldName, boolean include, @Nullable Number number)
public MapBuilder addNumber(String fieldName, boolean include, Supplier<Number> supplier)
public MapBuilder add(String fieldName, boolean include, @Nullable Map<String,?> mapValue)
public MapBuilder addMap(String fieldName, boolean include, Supplier<Map<String,?>> supplier)
public MapBuilder addTimestamp(String fieldName, boolean include, long timestamp)
Copyright © 2020. All rights reserved.