Class AssetDimensionsBuilder

java.lang.Object
com.commercetools.history.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(1)
             .h(1)
             .build()
 
  • Constructor Details

    • AssetDimensionsBuilder

      public AssetDimensionsBuilder()
  • Method Details

    • w

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

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

      public Integer getW()
      value of w}
      Returns:
      w
    • getH

      public Integer getH()
      value of h}
      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