Class Segment

  • Direct Known Subclasses:
    LineSegment

    public abstract class Segment
    extends Object
    Represents a linear shape, defined by a start and an end Point, and a SpatialReference. Segment is an abstract base class from which different types of segment class inherit, each defining a different way of connecting the start and end point. Segments are immutable.

    Currently only one segment type, LineSegment, is available. Polygons and Polylines are composed of one or more collections of Segments.

    Since:
    100.0.0
    • Method Detail

      • getStartPoint

        public Point getStartPoint()
        Gets a Point representing the start of this Segment.
        Returns:
        the start point
        Since:
        100.0.0
      • getEndPoint

        public Point getEndPoint()
        Gets a Point representing the end of this Segment.
        Returns:
        the end point
        Since:
        100.0.0
      • getSpatialReference

        public SpatialReference getSpatialReference()
        Gets the SpatialReference of this Segment.
        Returns:
        the SpatialReference of this Segment.
        Since:
        100.0.0
      • isCurve

        public boolean isCurve()
        Indicates if this Segment is curved.

        Currently this method always returns false, as the only type of Segment currently available is a LineSegment, which cannot represent curves.

        Returns:
        true if this Segment is curved, false otherwise
        Since:
        100.0.0
      • isClosed

        public boolean isClosed()
        Indicates if this segment is closed, that is it has a matching start and end point.
        Returns:
        true if the segment is closed, false otherwise
        Since:
        100.0.0