Interface Messages


public interface Messages
An interface for passing message strings by key.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all stored messages.
    get(String key)
    Retrieves the message value for the given key.
    Returns all stored messages.
    void
    set(String key, String value)
    Sets or replaces the message for the given key.
  • Method Details

    • clear

      void clear()
      Removes all stored messages.
    • set

      void set(String key, String value)
      Sets or replaces the message for the given key.
      Parameters:
      key - the message key
      value - the message value
    • get

      String get(String key)
      Retrieves the message value for the given key.
      Parameters:
      key - the message key
      Returns:
      the value, or null if not present
    • getAll

      Map<String,String> getAll()
      Returns all stored messages.
      Returns:
      a map of all messages; never null