StringResourceAccessor (JGoodies Common 1.8 API)
Date: 2015-01-03

com.jgoodies.common.internal

## Interface StringResourceAccessor

- All Known Subinterfaces:
    StringAndIconResourceAccessor
  All Known Implementing Classes:
    ResourceBundleAccessor

      public interface StringResourceAccessor

  Describes an object that can access a String resource via a key.

  This interface is used by the JGoodies Forms and the JGoodies Standard Dialog Library (JSDL) to access Strings from ResourceBundles and ResourceMaps (a class from JGoodies Application). The latter implements this interface directly. Since ResourceBundle does not implement this interface, a wrapper can be used that implements this interface and just delegates to the ResourceBundle to look up the String for a given resource key.

  Note: This class is not part of the public JGoodies Common API. It's intended for implementation purposes only. The class's API may change at any time.

  Since:
    1.8
  Author:
    Karsten Lentzsch

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getString(String key, Object... args)` Looks up and returns a String associated with the given resource key.

- - ### Method Detail

    - #### getString

          String getString(String key,
                         Object... args)

      Looks up and returns a String associated with the given resource key. If no arguments are provided, the plain String is returned. Otherwise the string will be formatted using `String.format` with the given arguments.
      Parameters:
        `key` - the key in the resource bundle
        `args` - optional format arguments forwarded to `String#format`
      Returns:
        the String value found for the given resource key, formatted with the optional arguments - if any
      See Also:
        `String.format(String, Object...)`

Copyright © 2009-2014 JGoodies Software GmbH. All Rights Reserved.