Class PointBuilder


  • public class PointBuilder
    extends java.lang.Object
    Creates Point instances representing a GeoJSON point type. The advantage of using the builder is to reduce confusion of the order of the latitude and longitude double values.

    Supported by server versions 2.4 and above.

    See Also:
    Point
    • Constructor Detail

      • PointBuilder

        public PointBuilder()
    • Method Detail

      • pointBuilder

        public static PointBuilder pointBuilder()
        Convenience method to return a new PointBuilder.
        Returns:
        a new instance of PointBuilder.
      • build

        public Point build()
        Creates an immutable point
        Returns:
        the Point with the specifications from this builder.
      • latitude

        public PointBuilder latitude​(double latitude)
        Add a latitude.
        Parameters:
        latitude - the latitude of the point
        Returns:
        this PointBuilder
      • longitude

        public PointBuilder longitude​(double longitude)
        Add a longitude.
        Parameters:
        longitude - the longitude of the point
        Returns:
        this PointBuilder