|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.util.BasicTextDecoder
public class BasicTextDecoder
Base class for text decoders. This decoder handles caching the decoded text, but does not provide any actual decoding logic. This class is thread safe.
Field Summary | |
---|---|
protected String |
decodedText
|
protected long |
lastUpdateTime
|
protected String |
text
|
Constructor Summary | |
---|---|
BasicTextDecoder()
|
Method Summary | |
---|---|
protected String |
decode(String textToDecode)
Decode the text. |
String |
getDecodedText()
Get the decoded text. |
long |
getLastUpdateTime()
Get the time at which the decoded text last changed. |
void |
setText(String input)
Set the input text which the decoder will process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String decodedText
protected long lastUpdateTime
protected String text
Constructor Detail |
---|
public BasicTextDecoder()
Method Detail |
---|
protected String decode(String textToDecode)
textToDecode
- The text to decode.
public String getDecodedText()
getDecodedText
in interface TextDecoder
public long getLastUpdateTime()
TextDecoder.getDecodedText()
is called. An application should call
TextDecoder.getDecodedText()
, and then call this method to compare the timestamp with some previous timestamp to
determine if the decoded text has changed since TextDecoder.getDecodedText()
was last called.
getLastUpdateTime
in interface TextDecoder
System.currentTimeMillis()
) at which the decoded text last changed.
Returns zero if called before the text is decoded.public void setText(String input)
setText
in interface TextDecoder
input
- Text to decode.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |