Package valorless.valorlessutils.json
Interface MessageArguments
public interface MessageArguments
Provides message arguments by key.
- 
Method SummaryModifier and TypeMethodDescriptiondefault MessageArgumentscombinedWith(MessageArguments other) Creates aMessageArgumentsthat combines this and the given otherMessageArguments.@Nullable ObjectGets the message argument for the specified key.static MessageArgumentsCreates aMessageArgumentsthat is backed by the givenMap.default MessageArgumentsCreates aMessageArgumentsthat prefixes the keys of thisMessageArguments.
- 
Method Details- 
ofMapCreates aMessageArgumentsthat is backed by the givenMap.The returned MessageArgumentsis a view on the underlying Map: It dynamically reflects changes to the underlying Map.- Parameters:
- arguments- the mapping from keys to message arguments, not- null
- Returns:
- the MessageArguments
 
- 
getGets the message argument for the specified key.The returned message argument can be of any type. The caller of this method is responsible for formatting it appropriately for use as message argument. The returned object may also be a Supplier: In this case, the object returned by the Supplier is meant to be used as the actual message argument.- Parameters:
- key- the key
- Returns:
- the message argument, or nullif there is none for the given key
 
- 
combinedWithCreates aMessageArgumentsthat combines this and the given otherMessageArguments.If no argument is found for a key inside this MessageArguments, the given otherMessageArgumentsis queried for an argument.- Parameters:
- other- the other- MessageArguments
- Returns:
- the combined MessageArguments
 
- 
prefixedCreates aMessageArgumentsthat prefixes the keys of thisMessageArguments.The returned MessageArgumentsis a view: The prefix is dynamically stripped from the passed keys in order to construct the key with which the lookup is performed in this originalMessageArguments.- Parameters:
- keyPrefix- the key prefix, not- null
- Returns:
- the prefixed MessageArguments
 
 
-