Package com.privatejgoodies.common.internal

## Class ResourceBundleLocalizer

- java.lang.Object
- - com.privatejgoodies.common.internal.ResourceBundleLocalizer

All Implemented Interfaces:
  `StringLocalizer`

    public final class ResourceBundleLocalizer
    extends java.lang.Object
    implements StringLocalizer

Turns a ResourceBundle into a `StringLocalizer`. 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.5.1
Author:
  Karsten Lentzsch

### Constructor Summary

Constructors
`ResourceBundleLocalizer​(java.util.ResourceBundle bundle)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getString​(java.lang.String resourceKey)` Looks up and returns the internationalized (i15d) string for the given resource key from the ResourceBundle that has been provided during the builder construction.

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

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

### Constructor Detail

#### ResourceBundleLocalizer

    public ResourceBundleLocalizer​(java.util.ResourceBundle bundle)

### Method Detail

#### getString

    public java.lang.String getString​(java.lang.String resourceKey)

Looks up and returns the internationalized (i15d) string for the given resource key from the ResourceBundle that has been provided during the builder construction.

Specified by:
  `getString` in interface `StringLocalizer`
Parameters:
  `resourceKey` - the key to look for in the resource bundle
Returns:
  the associated internationalized string, or the resource key itself in case of a missing resource
Throws:
  `java.lang.IllegalStateException` - if no ResourceBundle has been set