Package globus.glmap

Class GLMapVectorObjectList


  • @ParametersAreNonnullByDefault
    public class GLMapVectorObjectList
    extends GLNativeObject
    GLMapVectorObject is a bridge class, to work with GLMap internal representation of array of vector object.
    • Constructor Summary

      Constructors 
      Constructor Description
      GLMapVectorObjectList()
      Constructor of empty list
    • Method Summary

      Modifier and Type Method Description
      boolean addPoint​(long index, double lat, double lon)
      Adds point to list
      GLMapVectorObject find​(java.lang.String tag, java.lang.String value)
      Returns first object that have `tag` set to `value`
      GLMapVectorObject get​(long index)
      Returns object at the index
      GLMapBBox getBBox()
      Calculates bbox of all objects in list
      void remove​(long index)
      Removes object at the index
      void setObjectTag​(long index, java.lang.String tag, java.lang.String value)
      Sets tag for given object
      void setObjectTagTruncated​(long index, java.lang.String tag, java.lang.String value, int lineMaxLen, int maxLines)
      Truncates value and sets result for given object
      long size()
      Returns size of list
      GLMapVectorObject[] toArray()
      Creates an array of GLMapVectorObject
      boolean updatePoint​(long index, double lat, double lon)
      Sets new location of point
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GLMapVectorObjectList

        public GLMapVectorObjectList()
        Constructor of empty list
    • Method Detail

      • getBBox

        @NonNull
        public GLMapBBox getBBox()
        Calculates bbox of all objects in list
        Returns:
        bbox of all objects in list
      • toArray

        @NonNull
        public GLMapVectorObject[] toArray()
        Creates an array of GLMapVectorObject
        Returns:
        array of GLMapVectorObject
      • size

        public long size()
        Returns size of list
        Returns:
        size of list
      • get

        @NonNull
        public GLMapVectorObject get​(long index)
        Returns object at the index
        Parameters:
        index - index of object to return
        Returns:
        GLMapVectorObject at given index
      • find

        @Nullable
        public GLMapVectorObject find​(java.lang.String tag,
                                      java.lang.String value)
        Returns first object that have `tag` set to `value`
        Parameters:
        tag - tag to check
        value - value to check
        Returns:
        first object that have `tag` set to `value`
      • addPoint

        public boolean addPoint​(long index,
                                double lat,
                                double lon)
        Adds point to list
        Parameters:
        index - index where new object will be inserted
        lat - latitude of point
        lon - longitude of point
        Returns:
        true if success
      • updatePoint

        public boolean updatePoint​(long index,
                                   double lat,
                                   double lon)
        Sets new location of point
        Parameters:
        index - index of point to modify
        lat - latitude of point
        lon - longitude of point
        Returns:
        true if success
      • remove

        public void remove​(long index)
        Removes object at the index
        Parameters:
        index - index of object to remove
      • setObjectTag

        public void setObjectTag​(long index,
                                 java.lang.String tag,
                                 @Nullable
                                 java.lang.String value)
        Sets tag for given object
        Parameters:
        index - index of object
        tag - tag to set
        value - value to set
      • setObjectTagTruncated

        public void setObjectTagTruncated​(long index,
                                          java.lang.String tag,
                                          @Nullable
                                          java.lang.String value,
                                          int lineMaxLen,
                                          int maxLines)
        Truncates value and sets result for given object
        Parameters:
        index - index of object
        tag - tag to set
        value - value to set
        lineMaxLen - maximum length of line
        maxLines - maximum number of lines