Class ImageDimensionsBuilder

java.lang.Object
com.commercetools.history.models.common.ImageDimensionsBuilder
All Implemented Interfaces:
Builder<ImageDimensions>

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

     ImageDimensions imageDimensions = ImageDimensions.builder()
             .w(1)
             .h(1)
             .build()
 
  • Constructor Details

    • ImageDimensionsBuilder

      public ImageDimensionsBuilder()
  • 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 ImageDimensions build()
      builds ImageDimensions with checking for non-null required values
      Specified by:
      build in interface Builder<ImageDimensions>
      Returns:
      ImageDimensions
    • buildUnchecked

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

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

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