java.lang.Object
de.eldoria.schematicsanitizer.sanitizer.limit.builder.LimitBuilder

public class LimitBuilder extends Object
A builder class for creating instances of Limit. This class provides methods to set the size and the content limit of the limit.
  • Constructor Details

    • LimitBuilder

      public LimitBuilder()
  • Method Details

    • size

      public LimitBuilder size(int size)
      Sets the size of the LimitBuilder.
      Parameters:
      size - the size to set
      Returns:
      the LimitBuilder instance with the specified size
    • contentLimit

      public LimitBuilder contentLimit(Consumer<ContentLimitBuilder> limit)
      Sets the content limit by accepting a consumer of type ContentLimitBuilder. The content limit is used to define the maximum content that can be consumed or processed.
      Parameters:
      limit - The consumer function to set the content limit using the ContentLimitBuilder.
      Returns:
      This LimitBuilder instance.
    • build

      public Limit build()
      Constructs a Limit object based on the specified size and content limit.
      Returns:
      A Limit object with the specified size and content limit.