A C D F G H I L N O R S T

A

add(String, TextContainer) - Method in class org.pfsw.nls.TextContainerList
Add the text container to this list.
addFileMappings(Settings) - Method in class org.pfsw.nls.NLSIniFileDetector
 
addText(String, String) - Method in class org.pfsw.nls.TextContainer
Add the given text under the specified key.

C

coll() - Method in class org.pfsw.nls.NLSIniFileDetector
 
coll() - Method in class org.pfsw.nls.NLSIniFileLoader
 
containsKey(String) - Method in class org.pfsw.nls.TextContainer
Returns true if this container or its default container can provide a text for the specified key.
containsNothing() - Method in interface org.pfsw.nls.IExtendedTextProvider
Returns true if this text provider holds no text and also its default text provider contains nothing.
containsNothing() - Method in class org.pfsw.nls.ResourceBundleTextProvider
Returns true if this text provider holds no text and also its default text provider contains nothing.
containsNothing() - Method in class org.pfsw.nls.TextContainer
Returns true if this container holds no text and also its default container contains nothing.
containsNothing() - Method in class org.pfsw.nls.TextContainerList
Returns true if this text provider holds no text and also its default text provider contains nothing.
createLocale(String) - Method in class org.pfsw.nls.NLSUtil
Creates a locale from the given name.
createNewTextMap(int) - Method in class org.pfsw.nls.TextContainer
Creates a new instance of a map implementation.
createTextContainerList(Locale[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 
current() - Static method in class org.pfsw.nls.NLSUtil
Returns the only instance this class supports (design pattern "Singleton")

D

DEBUG - Static variable in class org.pfsw.nls.NLSIniFileDetector
 
DEFAULT_FILE_EXTENSTION - Static variable in class org.pfsw.nls.NLSIniFileDetector
 
detect(String) - Method in class org.pfsw.nls.NLSIniFileDetector
Detects all meta information files for the given base name on the current NLS lookup path.

F

FILE_MAPPING_SECTION - Static variable in class org.pfsw.nls.NLSIniFileDetector
 
fileUtil() - Method in class org.pfsw.nls.NLSUtil
 

G

getCharacterEncoding() - Method in class org.pfsw.nls.NLSIniFileLoader
 
getDefaultEncoding() - Method in class org.pfsw.nls.NLSIniFileLoader
Returns the default encoding that will be used to read text from a file if no explicit encoding was provided.
getDefaultProvider() - Method in class org.pfsw.nls.TextContainer
Returns the default container that will be used if a key cannot be found in this container.
getEncoding() - Method in class org.pfsw.nls.NLSIniFileLoader
Returns the encoding that should be used.
getFileForLocales(Locale) - Method in class org.pfsw.nls.NLSIniFileDetector
Returns the file locator for the given locale or null if not found.
getFileMappings() - Method in class org.pfsw.nls.NLSIniFileDetector
 
getFilesForLocales(Locale[]) - Method in class org.pfsw.nls.NLSIniFileDetector
Returns a file locators for wich a mapping to the given locales have been found.
getInitialCapacity() - Method in class org.pfsw.nls.TextContainer
Returns the initial capacity for the entries in this container.
getKeys() - Method in class org.pfsw.nls.TextContainer
Returns an array with all keys of this container.
getLocale() - Method in class org.pfsw.nls.ResourceBundleTextProvider
Returns the locale the underlying resource bundle was created
getLocale() - Method in class org.pfsw.nls.TextContainer
Returns the locale for which this container holds the text strings
getLocales() - Method in interface org.pfsw.nls.IExtendedTextProvider
Returns the locales for which this text provider has text
getLocales() - Method in class org.pfsw.nls.ResourceBundleTextProvider
Returns the locales for which this text provider has text
getLocales() - Method in class org.pfsw.nls.TextContainer
Returns the locales for which this text provider has text
getLocales() - Method in class org.pfsw.nls.TextContainerList
Returns the locales for which this list has an associated text container
getLookupOrder() - Method in class org.pfsw.nls.TextContainerList
Returns the current lookup order that will be used within getText(String).
getLookupPath() - Method in class org.pfsw.nls.NLSIniFileDetector
 
getMetadataIndicator() - Method in class org.pfsw.nls.NLSIniFileLoader
Sections that start with the prefix returned by this method are treated as metedata sections.
getNLSLookupPath() - Method in class org.pfsw.nls.NLSUtil
Returns a classpath that is used to lookup NLS text files.
getOrderedTextProviders() - Method in class org.pfsw.nls.TextContainerList
 
getResourceBundle() - Method in class org.pfsw.nls.ResourceBundleTextProvider
Returns the wrapped resource bundle
getString(String) - Method in class org.pfsw.nls.TextContainer
Returns the string or null from the internal map for the given key.
getText(String) - Method in interface org.pfsw.nls.ITextProvider
Returns the text associated with the given key or null if the key cannot be found.
getText(String) - Method in class org.pfsw.nls.ResourceBundleTextProvider
Returns the text associated with the given key or null if the key cannot be found.
getText(String) - Method in class org.pfsw.nls.TextContainer
Returns the text associated with the given key or null if the key cannot be found.
getText(String) - Method in class org.pfsw.nls.TextContainerList
Returns the text associated with the given key or null if the key cannot be found.
getTextContainer(String) - Method in class org.pfsw.nls.TextContainerList
Returns the text container for the given locale name or null if none can be found.
getTextContainer(Locale) - Method in class org.pfsw.nls.TextContainerList
Returns the text container for the given locale or null if none can be found.
getTextMap() - Method in class org.pfsw.nls.TextContainer
 

H

handleMetadataSection(Settings, String) - Method in class org.pfsw.nls.NLSIniFileLoader
 
handleMetadataSections(Settings, String[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 
handleTextKeys(TextContainerList, Settings, String[], String[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 
hasDefaultContainer() - Method in class org.pfsw.nls.TextContainer
Returns whether or not this container has a default container
hasKey(String) - Method in class org.pfsw.nls.TextContainer
Returns true if this container can provide a text for the specified key.

I

IExtendedTextProvider - Interface in org.pfsw.nls
Defines additional methods for retrieving keys and checking contants.
isEmpty() - Method in class org.pfsw.nls.TextContainer
Returns true if this container holds no text.
ITextProvider - Interface in org.pfsw.nls
Defines the minimal interface a class must implement in order to provide text for identifying keys.

L

loadText(File, String) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a text container with all texts for the specified locale from the given file.
loadText(File, Locale) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a text container with all texts for the specified locale from the given file.
loadText(File, Locale[]) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a list of text containers with all texts for the specified locales from the given file.
loadText(File, String[]) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a list of text containers with all texts for the specified locales from the given file.
loadText(FileLocator, String) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a text container with all texts for the specified locale from the given file.
loadText(FileLocator, Locale) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a text container with all texts for the specified locale from the given file.
loadText(FileLocator, Locale[]) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a list of text containers with all texts for the specified locales from the given file.
loadText(FileLocator, String[]) - Method in class org.pfsw.nls.NLSIniFileLoader
Returns a list of text containers with all texts for the specified locales from the given file.
loadTextContainers(FileLocator, Locale[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 
localesToStrings(Locale[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 

N

nls() - Method in class org.pfsw.nls.NLSIniFileDetector
 
nls() - Method in class org.pfsw.nls.NLSIniFileLoader
 
NLSIniFileDetector - Class in org.pfsw.nls
This class is responsible to lookup the classpath for a specified base name to which it depends the file extension ".ini".
NLSIniFileDetector() - Constructor for class org.pfsw.nls.NLSIniFileDetector
Initialize the new instance with default values.
NLSIniFileLoader - Class in org.pfsw.nls
This loader is capable of reading text values from an NLS-ini file to one or more TextContainer objects.
NLSIniFileLoader() - Constructor for class org.pfsw.nls.NLSIniFileLoader
Initialize the new instance with default values.
NLSUtil - Class in org.pfsw.nls
Provides some utility and convenience methods related NLS.

O

org.pfsw.nls - package org.pfsw.nls
National Language Support
The main purpose of this package is to provide an easy to use mechanism for accessing localized text.

R

readFileMapping(ClasspathElement, String) - Method in class org.pfsw.nls.NLSIniFileDetector
 
readFileMappingsFor(String, Classpath) - Method in class org.pfsw.nls.NLSIniFileDetector
Read all classes specified in the given file, if it exists in the specified classpath element.
reset() - Method in class org.pfsw.nls.NLSIniFileDetector
 
ResourceBundleTextProvider - Class in org.pfsw.nls
This is a simple wrapper around a resource bundle to give it the same interface ITextProvider as available for a TextContainer.
ResourceBundleTextProvider(ResourceBundle) - Constructor for class org.pfsw.nls.ResourceBundleTextProvider
Initialize the new instance with default values.

S

setDefaultProvider(IExtendedTextProvider) - Method in class org.pfsw.nls.TextContainer
Sets the default container.
setFileMappings(Map) - Method in class org.pfsw.nls.NLSIniFileDetector
 
setLocale(Locale) - Method in class org.pfsw.nls.TextContainer
Set the locale for which this container holds the text strings
setLookupOrder(Locale[]) - Method in class org.pfsw.nls.TextContainerList
Set the lookup order that will be used within getText(String).
setLookupPath(Classpath) - Method in class org.pfsw.nls.NLSIniFileDetector
 
setResourceBundle(ResourceBundle) - Method in class org.pfsw.nls.ResourceBundleTextProvider
Set the wrapped resource bundle
setTextMap(Map) - Method in class org.pfsw.nls.TextContainer
 
size() - Method in class org.pfsw.nls.TextContainer
Returns the number of entries in this container.
str() - Method in class org.pfsw.nls.NLSIniFileDetector
 
str() - Method in class org.pfsw.nls.NLSIniFileLoader
 
str() - Method in class org.pfsw.nls.NLSUtil
 
str() - Method in class org.pfsw.nls.TextContainer
 
stringsToLocales(String[]) - Method in class org.pfsw.nls.NLSIniFileLoader
 
SYS_PROP_NLS_PATH - Static variable in class org.pfsw.nls.NLSUtil
 

T

TextContainer - Class in org.pfsw.nls
This is is a simple container for text strings associated with an identifying key.
TextContainer(Locale) - Constructor for class org.pfsw.nls.TextContainer
Initialize the new instance with default values.
textContainerAt(int) - Method in class org.pfsw.nls.TextContainerList
Returns the text container at the specified index of null
TextContainerList - Class in org.pfsw.nls
Can hold many TextContainer objects which can be accessed via a locale name or a Locale object.
TextContainerList() - Constructor for class org.pfsw.nls.TextContainerList
Initialize the new instance with default values.

A C D F G H I L N O R S T