|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.imaginary.meme.Meme
A representation of a single concept that has many translations. It is
generally something as simple as a word, like "red". It can, however,
represent more complex memes like "a barrel full of monkeys" or
even full sentences or paragraphs. An example of the use of this
class is:
Meme meme = getSomeMeme();
System.out.println(meme.getTranslation(Locale.getDefault));
Last modified $Date: 1999/11/06 19:50:47 $
Constructor Summary | |
Meme()
Constructs an empty meme object. |
|
Meme(java.lang.String k)
Constructs a meme object having the specified key. |
|
Meme(java.lang.String k,
java.lang.String def)
Constructs a meme object having the specified key and default translation. |
Method Summary | |
void |
addTranslation(java.util.Locale l,
java.lang.String ph)
Adds a translation for this meme for the specified Locale. |
java.lang.String |
getDefaultTranslation()
The default translation is the translation for this ph that is provided whenever a translation is requested for an unsupported Locale. |
java.lang.String |
getKey()
The ph key is an identifier that can be used to uniquely identify this ph. |
java.lang.String |
getTranslation(java.util.Locale loc)
Provides a translation of this Meme for the specified Locale. |
void |
setDefaultTranslation(java.lang.String trans)
Sets the default translation. |
void |
setKey(java.lang.String key)
Sets the meme key. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Meme()
public Meme(java.lang.String k)
the
- value to use as the meme keypublic Meme(java.lang.String k, java.lang.String def)
k
- the meme keydef
- the default translationMethod Detail |
public void addTranslation(java.util.Locale l, java.lang.String ph)
l
- the Locale for which you wish to add a translationmeme
- the translated memepublic java.lang.String getDefaultTranslation()
public java.lang.String getKey()
public java.lang.String getTranslation(java.util.Locale loc)
loc
- the Locale for which a translation is desiredpublic void setDefaultTranslation(java.lang.String trans)
trans
- the default translationpublic void setKey(java.lang.String key)
key
- the meme key
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |