Class FacetTermBuilder

java.lang.Object
com.commercetools.api.models.product.FacetTermBuilder
All Implemented Interfaces:
Builder<FacetTerm>
Direct Known Subclasses:
FacetResultTermBuilder

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

     FacetTerm facetTerm = FacetTerm.builder()
             .count(0.3)
             .build()
 
  • Constructor Details

    • FacetTermBuilder

      public FacetTermBuilder()
  • Method Details

    • term

      public FacetTermBuilder term(Object term)
      set the value to the term
      Parameters:
      term - value to be set
      Returns:
      Builder
    • count

      public FacetTermBuilder count(Long count)
      set the value to the count
      Parameters:
      count - value to be set
      Returns:
      Builder
    • productCount

      public FacetTermBuilder productCount(@Nullable Long productCount)
      set the value to the productCount
      Parameters:
      productCount - value to be set
      Returns:
      Builder
    • getTerm

      public Object getTerm()
      value of term}
      Returns:
      term
    • getCount

      public Long getCount()
      value of count}
      Returns:
      count
    • getProductCount

      @Nullable public Long getProductCount()
      value of productCount}
      Returns:
      productCount
    • build

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

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

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

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