org.apache.tapestry5.internal.services

## Class MapMessages

- java.lang.Object
- - org.apache.tapestry5.ioc.util.AbstractMessages
  - - org.apache.tapestry5.internal.services.MapMessages

- All Implemented Interfaces:
    Messages

      public class MapMessages
      extends AbstractMessages

  Implementation of `Messages` based on a simple Map (of string keys and values).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapMessages(java.util.Locale locale, java.util.Map<java.lang.String,java.lang.String> properties)` A new instance retaining (not copying) the provided map.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<java.lang.String>` | `getKeys()` Returns a set of all the keys for which this instance may provide a value.
    `protected java.lang.String` | `valueForKey(java.lang.String key)` Invoked to provide the value for a particular key.

    - ### Methods inherited from class org.apache.tapestry5.ioc.util.AbstractMessages

      `contains, format, get, getFormatter`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MapMessages

          public MapMessages(java.util.Locale locale,
                             java.util.Map<java.lang.String,java.lang.String> properties)

      A new instance retaining (not copying) the provided map.

  - ### Method Detail

    - #### valueForKey

          protected java.lang.String valueForKey(java.lang.String key)

      Description copied from class: `AbstractMessages`
      Invoked to provide the value for a particular key. This may be invoked multiple times even for the same key. The implementation should ignore the case of the key.
      Specified by:
        `valueForKey` in class `AbstractMessages`
      Parameters:
        `key` - the key to obtain a value for (case insensitive)
      Returns:
        the value for the key, or null if this instance can not provide the value

    - #### getKeys

          public java.util.Set<java.lang.String> getKeys()

      Description copied from interface: `Messages`
      Returns a set of all the keys for which this instance may provide a value.
      Returns:
        set of keys

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.