public static final class MapMessageSource.Builder extends Object
MapMessageSource| Modifier and Type | Method and Description |
|---|---|
MessageSource |
build()
Build a new message source from the contents of this builder
|
MapMessageSource.Builder |
put(String key,
String message)
Add one key/message pair
|
MapMessageSource.Builder |
putAll(Map<String,String> map)
Add a map of key/message pairs
|
public MapMessageSource.Builder put(String key, String message)
This overrides the value if the key already existed.
key - the keymessage - the messageNullPointerException - either the key or the value is nullpublic MapMessageSource.Builder putAll(Map<String,String> map)
This overrides all values of already existing keys.
map - the mapNullPointerException - the map is null; or a key, or value, is
nullpublic MessageSource build()
MapMessageSource