Class GeoJsonPointBuilder

java.lang.Object
com.commercetools.api.models.common.GeoJsonPointBuilder
All Implemented Interfaces:
Builder<GeoJsonPoint>

public class GeoJsonPointBuilder extends Object implements Builder<GeoJsonPoint>
GeoJsonPointBuilder
Example to create an instance using the builder pattern

     GeoJsonPoint geoJsonPoint = GeoJsonPoint.builder()
             .plusCoordinates(coordinatesBuilder -> coordinatesBuilder)
             .build()
 
  • Constructor Details

    • GeoJsonPointBuilder

      public GeoJsonPointBuilder()
  • Method Details

    • coordinates

      public GeoJsonPointBuilder coordinates(Double... coordinates)

      Longitude (stored on index [0]) and latitude (stored on index [1]) of the Point.

      Parameters:
      coordinates - value to be set
      Returns:
      Builder
    • coordinates

      public GeoJsonPointBuilder coordinates(List<Double> coordinates)

      Longitude (stored on index [0]) and latitude (stored on index [1]) of the Point.

      Parameters:
      coordinates - value to be set
      Returns:
      Builder
    • plusCoordinates

      public GeoJsonPointBuilder plusCoordinates(Double... coordinates)

      Longitude (stored on index [0]) and latitude (stored on index [1]) of the Point.

      Parameters:
      coordinates - value to be set
      Returns:
      Builder
    • getCoordinates

      public List<Double> getCoordinates()

      Longitude (stored on index [0]) and latitude (stored on index [1]) of the Point.

      Returns:
      coordinates
    • build

      public GeoJsonPoint build()
      builds GeoJsonPoint with checking for non-null required values
      Specified by:
      build in interface Builder<GeoJsonPoint>
      Returns:
      GeoJsonPoint
    • buildUnchecked

      public GeoJsonPoint buildUnchecked()
      builds GeoJsonPoint without checking for non-null required values
      Returns:
      GeoJsonPoint
    • of

      public static GeoJsonPointBuilder of()
      factory method for an instance of GeoJsonPointBuilder
      Returns:
      builder
    • of

      public static GeoJsonPointBuilder of(GeoJsonPoint template)
      create builder for GeoJsonPoint instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder