com.artima.place.attribute
Class Text.Cache
java.lang.Object
|
+--com.artima.place.attribute.Text.Cache
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Enclosing class:
- Text
- public static class Text.Cache
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
Contains a String
cached text and its Locale
, the cache
for a Text
object.
- See Also:
- Serialized Form
Constructor Summary |
Text.Cache(java.lang.String cachedText,
java.util.Locale cachedLocale)
Constructs a new Text.Cache with passed String cached text and cached Locale . |
Method Summary |
java.util.Locale |
getLocale()
Returns the Locale contained in this Text.Cache , which represents
the Locale of the text returned by the getText method. |
java.lang.String |
getText()
Returns the String text contained in this Text.Cache . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Text.Cache
public Text.Cache(java.lang.String cachedText,
java.util.Locale cachedLocale)
- Constructs a new
Text.Cache
with passed String
cached text and cached Locale
.
- Parameters:
cachedText
- the String
cached textcachedLocale
- the Locale
of the cached text- Throws:
NullPointerException
- if either of the passed
cachedText
or cachedLocale
references are
null
getText
public java.lang.String getText()
- Returns the
String
text contained in this Text.Cache
. This
method will never return null
.
- Returns:
- a
String
text
getLocale
public java.util.Locale getLocale()
- Returns the
Locale
contained in this Text.Cache
, which represents
the Locale
of the text returned by the getText
method. This
method will never return null
.
- Returns:
- a
Locale
for the text returned by the getText
method