Class AssetDimensionsBuilder

java.lang.Object
com.commercetools.importapi.models.common.AssetDimensionsBuilder
All Implemented Interfaces:
Builder<AssetDimensions>

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

     AssetDimensions assetDimensions = AssetDimensions.builder()
             .w(0.3)
             .h(0.3)
             .build()
 
  • Constructor Details

    • AssetDimensionsBuilder

      public AssetDimensionsBuilder()
  • Method Details

    • w

      The width of the asset source.

      Parameters:
      w - value to be set
      Returns:
      Builder
    • h

      The height of the asset source.

      Parameters:
      h - value to be set
      Returns:
      Builder
    • getW

      public Integer getW()

      The width of the asset source.

      Returns:
      w
    • getH

      public Integer getH()

      The height of the asset source.

      Returns:
      h
    • build

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

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

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

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