Class ImmutablePointCollection

java.lang.Object
java.util.AbstractCollection<Point>
java.util.AbstractList<Point>
com.esri.arcgisruntime.geometry.ImmutablePointCollection
All Implemented Interfaces:
Iterable<Point>, Collection<Point>, List<Point>, SequencedCollection<Point>

public final class ImmutablePointCollection extends AbstractList<Point>
Represents an immutable collection of Points that compose an immutable Multipoint geometry.

Use getPoints to return the collection of Points in a Multipoint geometry. ImmutablePointCollections can also be used as input parameters to initialize contents when constructing Parts and PartCollections.

Because geometries themselves are immutable, the collections they are composed of are also immutable. For geometry editing or creation workflows, a mutable PointCollection is used instead.

Since:
100.0.0
See Also:
  • Method Details

    • getSpatialReference

      public SpatialReference getSpatialReference()
      Gets the SpatialReference of the Points in this collection. The SpatialReference defines how the coordinates of the geometries correspond to locations in the real world. May be null.
      Returns:
      the SpatialReference of the Points in this collection
      Since:
      100.0.0
    • get

      public Point get(int index)
      Gets a copy of the Point at the given index in the ImmutablePointCollection. Use size() to determine the maximum possible index.
      Specified by:
      get in interface List<Point>
      Specified by:
      get in class AbstractList<Point>
      Parameters:
      index - the index of the Point to get
      Returns:
      a copy of the Point at the given index
      Throws:
      IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size())
      Since:
      100.0.0
    • size

      public int size()
      Returns the number of Points in this ImmutablePointCollection. Use this to find the maximum index for calling get(int).
      Specified by:
      size in interface Collection<Point>
      Specified by:
      size in interface List<Point>
      Specified by:
      size in class AbstractCollection<Point>
      Since:
      100.0.0
      See Also:
    • indexOf

      public int indexOf(Object o)
      Specified by:
      indexOf in interface List<Point>
      Overrides:
      indexOf in class AbstractList<Point>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Point>
      Specified by:
      isEmpty in interface List<Point>
      Overrides:
      isEmpty in class AbstractCollection<Point>