|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.i18n.bundle.I18nBundleEntry
public class I18nBundleEntry
A class to represent an entry in a bundle.
The object matches exactly one resource file in a given scope. The object has three properties :path : the path to resource file where to find transaltion for the entry.
locale : the locale of the entry
path.
This object is Comparable, the order relation is defined like this :
scope, in the scope order (see I18nBundleScope),
locale string representation.
I18nBundleScope| Field Summary | |
|---|---|
protected java.util.Locale |
locale
local of the entry, can be null if general scope |
protected java.net.URL |
path
path to resource file |
protected I18nBundleScope |
scope
scope of the entry |
| Constructor Summary | |
|---|---|
I18nBundleEntry(java.net.URL path,
java.util.Locale locale,
I18nBundleScope scope)
Constructor if an bundle entry. |
|
| Method Summary | |
|---|---|
int |
compareTo(I18nBundleEntry o)
|
boolean |
equals(java.lang.Object o)
|
java.util.Locale |
getLocale()
|
java.net.URL |
getPath()
|
I18nBundleScope |
getScope()
|
int |
hashCode()
|
void |
load(java.util.Properties resource)
For a given language, load the resource file of this entry into the resource
properties object. |
boolean |
matchLocale(java.util.Locale locale,
I18nBundleScope scope)
Method to match or not a bundle entry for a given scope and locale. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.net.URL path
protected java.util.Locale locale
protected I18nBundleScope scope
| Constructor Detail |
|---|
public I18nBundleEntry(java.net.URL path,
java.util.Locale locale,
I18nBundleScope scope)
path of the resource file, a scope and a locale.
path - the path of the resource file fo the bundle entrylocale - the given locale of the bundle entryscope - the scope of the given entry| Method Detail |
|---|
public java.net.URL getPath()
public java.util.Locale getLocale()
public I18nBundleScope getScope()
public boolean matchLocale(java.util.Locale locale,
I18nBundleScope scope)
locale - the locale to matchscope - the highest scope to match
true if the entry match the scope and locale
*
public void load(java.util.Properties resource)
throws java.io.IOException
resource
properties object.
resource - the save of resources already loaded
java.io.IOException - if any pb while reading resource filepublic int compareTo(I18nBundleEntry o)
compareTo in interface java.lang.Comparable<I18nBundleEntry>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||