Interface Mapper


public interface Mapper
Maps keys to values in a similar way to Map. The difference is that a mapper could be stateless, i.e. the lookup may be performed dynamically.
See Also:
  • Method Details

    • get

      default Object get(String key)
    • getAsync

      default CompletionStage<Object> getAsync(String key)
    • appliesTo

      default boolean appliesTo(String key)
      Parameters:
      key -
      Returns:
      true if the mapper should be applied to the specified key
    • mappedKeys

      default Set<String> mappedKeys()
      The returned set may be a subset of the final set of all mapped keys.
      Returns:
      the set of known mapped keys
    • wrap

      static Mapper wrap(Map<String,?> map)
      Parameters:
      map -
      Returns:
      a mapper that wraps the given map