java.lang.Object
io.sf.jclf.text.LocalStringList
A localized list of Strings. Lists can be nested.
A string list is a file containing several strings, each one on a different line.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Does this list contain that word?Get the locale name.static LocalStringList
getLocalList
(String baseName, String ext) Get the requested localized StringList for the default locale.static LocalStringList
getLocalList
(String baseName, String ext, Locale locale) Get the requested localized StringList.boolean
isEmpty()
Is this list empty?iterator()
Retrieves an iterator for the string list.static LocalStringList
Load a localized StringList.void
setParent
(LocalStringList parent) Set the parent of this list.
-
Method Details
-
getLocaleName
Get the locale name.- Returns:
- the locale name.
-
setParent
Set the parent of this list.- Parameters:
parent
- the parent list.
-
isEmpty
public boolean isEmpty()Is this list empty?- Returns:
true
if the list is empty,false
otherwise.
-
contains
Does this list contain that word?- Parameters:
word
- the word to search for.- Returns:
true
if this list contains the specified word,false
otherwise.
-
iterator
Retrieves an iterator for the string list.- Returns:
- the iterator.
-
getLocalList
Get the requested localized StringList for the default locale.- Parameters:
baseName
- see class description.ext
- see class description.- Returns:
- the localized string list best matching the default locale.
- Throws:
IOException
- if cannot find the localized file for the given base name and extension, for the default locale.
-
getLocalList
public static LocalStringList getLocalList(String baseName, String ext, Locale locale) throws IOException Get the requested localized StringList.- Parameters:
baseName
- see class description.ext
- see class description.locale
- see class description.- Returns:
- the localized string list best matching the given locale.
- Throws:
IOException
- if cannot find the localized file for the given base name, locale, and extension.
-
loadList
Load a localized StringList.- Parameters:
baseFileName
- the base file name.localeName
- the locale.ext
- the extension.- Returns:
- the exact localized string list for the given locale, or null if it could not be loaded.
-