Class LimitBuilder
java.lang.Object
de.eldoria.schematicsanitizer.sanitizer.limit.builder.LimitBuilder
A builder class for creating instances of
Limit
.
This class provides methods to set the size and the content limit of the limit.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs aLimit
object based on the specified size and content limit.contentLimit
(Consumer<ContentLimitBuilder> limit) Sets the content limit by accepting a consumer of typeContentLimitBuilder
.size
(int size) Sets the size of the LimitBuilder.
-
Constructor Details
-
LimitBuilder
public LimitBuilder()
-
-
Method Details
-
size
Sets the size of the LimitBuilder.- Parameters:
size
- the size to set- Returns:
- the LimitBuilder instance with the specified size
-
contentLimit
Sets the content limit by accepting a consumer of typeContentLimitBuilder
. 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 theContentLimitBuilder
.- Returns:
- This LimitBuilder instance.
-
build
Constructs aLimit
object based on the specified size and content limit.- Returns:
- A
Limit
object with the specified size and content limit.
-