com.supermap.data

Class Point2Ds

  • java.lang.Object
    • com.supermap.data.Point2Ds


  • public class Point2Ds
    extends java.lang.Object
    The Point2Ds calss.

    A Point2Ds object is a collection of Point2D objects. The Point2Ds class is used to manage all the vertices on a GeoLine or a part of a GeoLine object. As any GeoLine object or any part of a GeoLine object has direction, so the Point2Ds object is a collection of ordered Point2D objects.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Point2Ds()
      Constructs a new Point2Ds object.
      Point2Ds(Point2D[] points)
      Creates a new Point2Ds object according to the specified arguments.
      Point2Ds(Point2Ds points)
      Constructs a new object identical to the given Point2Ds object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int add(Point2D point)
      Adds the specified Point2D object to the end of this Point2Ds object.
      int addRange(Point2D[] points)
      Adds the specified multiple Point2D objects to the end of this Point2Ds object.
      void clear()
      Clears all the Point2D objects in this Point2Ds bject.
      Point2Ds clone()
      Returns a copy of the current Point2Ds object.
      int getCount()
      Returns the count of Point2D objects in this Point2Ds object.
      Point2D getItem(int index)
      Returns the Point2D object at the specified index in this Point2Ds object.
      boolean insert(int index, Point2D point)
      Adds the specified Point2D object to the specified index in this Point2Ds object.
      int insertRange(int index, Point2D[] points)
      Adds the specified multiple Point2D object to this Point2Ds object starting from the specified index.
      boolean remove(int index)
      Removes the Point2D object with the specified index from this Point2Ds object.
      int removeRange(int index, int count)
      Removes the specified count of Point2D objects starting from the specified the index.
      void setItem(int index, Point2D point2D)
      Sets the Point2D object at the specified index in this Point2Ds object.
      Point2D[] toArray()
      Converts this Point2Ds object to an array of the Point2D objects.
      • Methods inherited from class java.lang.Object

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

      • Point2Ds

        public Point2Ds()
        Constructs a new Point2Ds object.
      • Point2Ds

        public Point2Ds(Point2D[] points)
        Creates a new Point2Ds object according to the specified arguments.
        Parameters:
        points - The specified Point2D array.
      • Point2Ds

        public Point2Ds(Point2Ds points)
        Constructs a new object identical to the given Point2Ds object.
        Parameters:
        points - The specified Point2Ds object.
    • Method Detail

      • getCount

        public int getCount()
        Returns the count of Point2D objects in this Point2Ds object.
        Returns:
        the count of Point2D objects in this Point2Ds object.
        Default:
        The default value is 0.
      • getItem

        public Point2D getItem(int index)
        Returns the Point2D object at the specified index in this Point2Ds object.
        Parameters:
        index - The specified index.
        Returns:
        the Point2D object with the specified index from this Point2Ds object.
      • setItem

        public void setItem(int index,
                            Point2D point2D)
        Sets the Point2D object at the specified index in this Point2Ds object.
        Parameters:
        index - The specified index.
        point2D - the Point2D object with the specified index from this Point2Ds object.
      • clone

        public Point2Ds clone()
        Returns a copy of the current Point2Ds object.
        Overrides:
        clone in class java.lang.Object
        Returns:
        The new Point2Ds object generated from the clone operation.
      • add

        public int add(Point2D point)
        Adds the specified Point2D object to the end of this Point2Ds object.
        Parameters:
        point - The Point2D object to be added to the Point2Ds object.
        Returns:
        The index of the added Point2D object.
      • addRange

        public int addRange(Point2D[] points)
        Adds the specified multiple Point2D objects to the end of this Point2Ds object.
        Parameters:
        points - The Point2D object to be added to multiple Point2Ds objects.
        Returns:
        The count of added Point2D objects.
      • insert

        public boolean insert(int index,
                              Point2D point)
        Adds the specified Point2D object to the specified index in this Point2Ds object.
        Parameters:
        index - The index to which the JoinItem object will be added.
        point - The point object to be added.
        Returns:
        true if successful; otherwise, false.
      • insertRange

        public int insertRange(int index,
                               Point2D[] points)
        Adds the specified multiple Point2D object to this Point2Ds object starting from the specified index.
        Parameters:
        index - The specified index from which to add the Point2D objects.
        points - The Point2D object array to be added.
        Returns:
        The count of added Point2D object.
      • remove

        public boolean remove(int index)
        Removes the Point2D object with the specified index from this Point2Ds object.
        Parameters:
        index - The index of the Point2D object to be removed.
        Returns:
        returns true if successful; otherwise false.
      • removeRange

        public int removeRange(int index,
                               int count)
        Removes the specified count of Point2D objects starting from the specified the index.
        Parameters:
        index - The specified index from which to delete the Point2D objects.
        count - The count of the Point2D objects to be removed.
        Returns:
        The count of the Point2D objects to be removed.
      • clear

        public void clear()
        Clears all the Point2D objects in this Point2Ds bject.
      • toArray

        public Point2D[] toArray()
        Converts this Point2Ds object to an array of the Point2D objects.
        Returns:
        The array of the Point2D objects.