public class FormatBundle
extends java.lang.Object
| Constructor and Description | 
|---|
FormatBundle(java.lang.Class type)
Creates a formatting resource bundle for a type. 
 | 
FormatBundle(java.util.ResourceBundle bundle)
Creates the formatting resource bundle from a resource bundle. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.StringBuffer | 
append(java.lang.StringBuffer buffer, java.lang.String key, java.lang.Object... arguments)
Append the formatted string corresponding to a key and an array of arguments. 
 | 
boolean | 
contains(java.lang.String key)
Gets true if the bundle contains a string corresponding to a key. 
 | 
java.lang.String | 
get(java.lang.String key)
Gets the formatted string corresponding to a key. 
 | 
java.lang.String | 
get(java.lang.String key, java.lang.Object... arguments)
Gets the formatted string corresponding to a key and an array of arguments. 
 | 
java.util.ResourceBundle | 
getBundle()
Gets the ResourceBundle underlying this FormatBundle. 
 | 
public FormatBundle(java.util.ResourceBundle bundle)
public FormatBundle(java.lang.Class type)
Unless the type is a subclass of ResourceBundle, the bundle name will be the type name with "Bundle" appended.
type - The type identifying the resource bundle.public java.lang.String get(java.lang.String key)
key - The key in the resource bundle of the format string.
public java.lang.String get(java.lang.String key,
                   java.lang.Object... arguments)
key - The key in the resource bundle of the format string.arguments - The arguments.
public java.lang.StringBuffer append(java.lang.StringBuffer buffer,
                            java.lang.String key,
                            java.lang.Object... arguments)
buffer - The buffer to which to append.key - The key in the resource bundle of the format string.arguments - The arguments.public boolean contains(java.lang.String key)
key - The key in the resource bundle of the string.public java.util.ResourceBundle getBundle()