Package gov.nasa.worldwind.util
Interface TextDecoder
-
- All Known Implementing Classes:
BasicTextDecoder
,KMLBalloonTextDecoder
public interface TextDecoder
A general purpose text decoder. A text decoder takes an input string and produces a decoded output string.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDecodedText()
Get the decoded text.long
getLastUpdateTime()
Get the time at which the decoded text last changed.void
setText(java.lang.String input)
Set the input text which the decoder will process.
-
-
-
Method Detail
-
setText
void setText(java.lang.String input)
Set the input text which the decoder will process.- Parameters:
input
- Text to decode.
-
getDecodedText
java.lang.String getDecodedText()
Get the decoded text. This method may be called many times. Implementations should cache decoding results that do not need to be recomputed.- Returns:
- Text after decoding.
-
getLastUpdateTime
long getLastUpdateTime()
Get the time at which the decoded text last changed. The text can change because new source text is set, or because an external resource required for decoding has been resolved.The update time does not change until
getDecodedText()
is called. An application should callgetDecodedText()
, and then call this method to compare the timestamp with some previous timestamp to determine if the decoded text has changed sincegetDecodedText()
was last called.- Returns:
- The time (as returned by
System.currentTimeMillis()
) at which the decoded text last changed. Returns zero if called before the text is decoded.
-
-