Package globus.glmap
Class GLMapValue
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapDrawObject
globus.glmap.GLMapValue
Holds a string value and optional highlight ranges.
Highlight information is typically produced by the offline search engine and can be rendered
as a SpannableString via getSpanned(Object, Object, int).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatReturns number valueandroid.text.SpannableStringgetSpanned(Object normal, Object highlighted, int flags) Returns spannable text valueReturns plain text valueinthashCode()static StringTruncates a string and splits it into multiple lines.Methods inherited from class globus.glmap.GLMapDrawObject
getDrawOrder, isHidden, setHiddenMethods inherited from class globus.glmap.GLNativeObject
dispose
-
Constructor Details
-
GLMapValue
CreatesGLMapValuefrom a string.- Parameters:
value- string
-
-
Method Details
-
getString
Returns plain text value- Returns:
- plain text
-
getNumber
public float getNumber()Returns number value- Returns:
- number or NAN if not a number
-
getSpanned
@NonNull public android.text.SpannableString getSpanned(Object normal, Object highlighted, int flags) Returns spannable text value- Parameters:
normal- attributes for normal texthighlighted- attributes for highlighted textflags- flags for spans- Returns:
- spannable string
-
hashCode
public int hashCode() -
equals
-
truncate
Truncates a string and splits it into multiple lines.- Parameters:
string- string to modifylineMaxLen- max line lengthmaxLines- max line count- Returns:
- truncated string
-