Interface VariantSelection


public interface VariantSelection

Variant selection specifying how variants are included or excluded.


Example to create an instance using the builder pattern

     VariantSelection variantSelection = VariantSelection.builder()
             .type(VariantSelectionType.INCLUDE_ONLY)
             .build()
 
  • Method Details

    • getType

      @NotNull @NotNull VariantSelectionType getType()

      Type of variant selection.

      Returns:
      type
    • getSkus

      List<String> getSkus()

      List of SKUs to include or exclude.

      Returns:
      skus
    • setType

      void setType(VariantSelectionType type)

      Type of variant selection.

      Parameters:
      type - value to be set
    • setSkus

      void setSkus(String... skus)

      List of SKUs to include or exclude.

      Parameters:
      skus - values to be set
    • setSkus

      void setSkus(List<String> skus)

      List of SKUs to include or exclude.

      Parameters:
      skus - values to be set
    • of

      static VariantSelection of()
      factory method
      Returns:
      instance of VariantSelection
    • of

      static VariantSelection of(VariantSelection template)
      factory method to create a shallow copy VariantSelection
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      VariantSelection copyDeep()
    • deepCopy

      @Nullable static VariantSelection deepCopy(@Nullable VariantSelection template)
      factory method to create a deep copy of VariantSelection
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static VariantSelectionBuilder builder()
      builder factory method for VariantSelection
      Returns:
      builder
    • builder

      static VariantSelectionBuilder builder(VariantSelection template)
      create builder for VariantSelection instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withVariantSelection

      default <T> T withVariantSelection(Function<VariantSelection,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<VariantSelection> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference