Class RangeFacetResultBuilder

java.lang.Object
com.commercetools.api.models.product.RangeFacetResultBuilder
All Implemented Interfaces:
Builder<RangeFacetResult>

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

     RangeFacetResult rangeFacetResult = RangeFacetResult.builder()
             .plusRanges(rangesBuilder -> rangesBuilder)
             .build()
 
  • Constructor Details

    • RangeFacetResultBuilder

      public RangeFacetResultBuilder()
  • Method Details

    • ranges

      public RangeFacetResultBuilder ranges(FacetRange... ranges)

      Statistical data over values for date, time, datetime, number, and money type fields.

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

      public RangeFacetResultBuilder ranges(List<FacetRange> ranges)

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      ranges - value to be set
      Returns:
      Builder
    • plusRanges

      public RangeFacetResultBuilder plusRanges(FacetRange... ranges)

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      ranges - value to be set
      Returns:
      Builder
    • plusRanges

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      builder - function to build the ranges value
      Returns:
      Builder
    • withRanges

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      builder - function to build the ranges value
      Returns:
      Builder
    • addRanges

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      builder - function to build the ranges value
      Returns:
      Builder
    • setRanges

      Statistical data over values for date, time, datetime, number, and money type fields.

      Parameters:
      builder - function to build the ranges value
      Returns:
      Builder
    • getRanges

      public List<FacetRange> getRanges()

      Statistical data over values for date, time, datetime, number, and money type fields.

      Returns:
      ranges
    • build

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

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

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

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