Package globus.glmap

Class GLMapValue


public class GLMapValue extends GLMapDrawObject
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 Details

    • GLMapValue

      public GLMapValue(String value)
      Creates GLMapValue from string
      Parameters:
      value - string
  • Method Details

    • getString

      @Nullable public String 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 text
      highlighted - attributes for highlighted text
      flags - flags for spans
      Returns:
      spannable string
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • truncate

      @NonNull public static String truncate(@NonNull String string, int lineMaxLen, int maxLines)
      Truncates string and add split to lines
      Parameters:
      string - string to modify
      lineMaxLen - max line length
      maxLines - max line count
      Returns:
      truncated string