public class TableLocaleSource extends java.lang.Object implements LocaleDataSource
Modifier and Type | Field and Description |
---|---|
private OrderedMap<java.lang.String,java.lang.String> |
localeData |
Constructor and Description |
---|
TableLocaleSource() |
TableLocaleSource(OrderedMap<java.lang.String,java.lang.String> localeData) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
OrderedMap<java.lang.String,java.lang.String> |
getLocalizedText() |
boolean |
hasMapping(java.lang.String textID)
Determine whether a locale has a mapping for a given text handle.
|
void |
readExternal(java.io.DataInputStream in,
PrototypeFactory pf) |
void |
setLocaleMapping(java.lang.String textID,
java.lang.String text)
Set a text mapping for a single text handle for a given locale.
|
void |
writeExternal(java.io.DataOutputStream out) |
private OrderedMap<java.lang.String,java.lang.String> localeData
public TableLocaleSource()
public TableLocaleSource(OrderedMap<java.lang.String,java.lang.String> localeData)
public void setLocaleMapping(java.lang.String textID, java.lang.String text)
textID
- Text handle. Must not be null. Need not be previously defined for this locale.text
- Localized text for this text handle and locale. Will overwrite any previous mapping, if one existed.
If null, will remove any previous mapping for this text handle, if one existed.UnregisteredLocaleException
- If locale is not defined or null.java.lang.NullPointerException
- if textID is nullpublic boolean hasMapping(java.lang.String textID)
textID
- Text handle.UnregisteredLocaleException
- If locale is not defined.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public OrderedMap<java.lang.String,java.lang.String> getLocalizedText()
getLocalizedText
in interface LocaleDataSource
public void readExternal(java.io.DataInputStream in, PrototypeFactory pf) throws java.io.IOException, DeserializationException
readExternal
in interface Externalizable
java.io.IOException
DeserializationException
public void writeExternal(java.io.DataOutputStream out) throws java.io.IOException
writeExternal
in interface Externalizable
java.io.IOException