Package globus.glmap
Class GLMapValue
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapDrawObject
globus.glmap.GLMapValue
GLMapValue
is a class that hold string value and optional information to highlight
some parts of it. Usually highlight information comes from search engine.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
float
Returns number valueandroid.text.SpannableString
getSpanned
(Object normal, Object highlighted, int flags) Returns spannable text valueReturns plain text valueint
hashCode()
static String
Truncates string and add split to linesMethods inherited from class globus.glmap.GLMapDrawObject
getDrawOrder, isHidden, setHidden
Methods inherited from class globus.glmap.GLNativeObject
dispose
-
Constructor Details
-
GLMapValue
Creates GLMapValue from 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 string and add split to lines- Parameters:
string
- string to modifylineMaxLen
- max line lengthmaxLines
- max line count- Returns:
- truncated string
-