diff --git a/example/generated-example-builder/org/javahelpers/simple/builders/example/BookDtoBuilder.java b/example/generated-example-builder/org/javahelpers/simple/builders/example/BookDtoBuilder.java index eacfca38..3de32abf 100644 --- a/example/generated-example-builder/org/javahelpers/simple/builders/example/BookDtoBuilder.java +++ b/example/generated-example-builder/org/javahelpers/simple/builders/example/BookDtoBuilder.java @@ -10,7 +10,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.function.UnaryOperator; import org.apache.commons.lang3.builder.ToStringBuilder; import org.javahelpers.simple.builders.core.util.BuilderToStringStyle; import org.javahelpers.simple.builders.core.util.TrackedValue; @@ -27,35 +26,22 @@ *
{@code
* BookDto result = BookDtoBuilder.create()
* .author("example value")
- * .authorUpdate(String::trim)
* .available(true)
- * .availableUpdate(value -> !value)
* .category('x')
* .discount(3.14f)
- * .discountUpdate(Math::abs)
* .exactPrice(BigDecimal.valueOf(3.14))
* .genres(Set.of("example value"))
- * .genresUpdate(TreeSet::new)
* .isbn("example value")
- * .isbnUpdate(String::trim)
* .lastUpdated(LocalDateTime.now())
- * .lastUpdatedUpdate(value -> value.plusDays(1))
* .metadata(Map.of("example value", "example value"))
- * .metadataUpdate(Map::copyOf)
* .pages(42)
- * .pagesUpdate(Math::abs)
* .price(3.14)
- * .priceUpdate(Math::abs)
* .publishDate(LocalDate.now())
- * .publishDateUpdate(value -> value.plusDays(1))
* .publisher(PersonDtoBuilder.create().build())
* .salesCount(42L)
- * .salesCountUpdate(Math::abs)
* .subtitle(Optional.of("example value"))
* .tags(List.of("example value"))
- * .tagsUpdate(list -> list.stream().sorted().toList())
* .title("example value")
- * .titleUpdate(String::trim)
* .build();
* }
*/
@@ -205,32 +191,6 @@ public BookDtoBuilder author(String author) {
return this;
}
- /**
- * Updates the current value of author in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * - * Generated from setter {@link BookDto#setAuthor(String) setAuthor(String author)} - * - *
{@code
- * builder.author("example value").authorUpdate(String::trim);
- * }
- *
- * @param authorUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if author has not been set yet
- */
- public BookDtoBuilder authorUpdate(UnaryOperatoravailable.
*
@@ -250,32 +210,6 @@ public BookDtoBuilder available(boolean available) {
return this;
}
- /**
- * Updates the current value of available in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- *
- * Generated from setter {@link BookDto#setAvailable(boolean) setAvailable(boolean available)} - * - *
{@code
- * builder.available(true).availableUpdate(value -> !value);
- * }
- *
- * @param availableUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if available has not been set yet
- */
- public BookDtoBuilder availableUpdate(UnaryOperatorcategory.
*
@@ -295,26 +229,6 @@ public BookDtoBuilder category(char category) {
return this;
}
- /**
- * Updates the current value of category in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- *
- * Generated from setter {@link BookDto#setCategory(char) setCategory(char category)}
- *
- * @param categoryUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if
@@ -334,32 +248,6 @@ public BookDtoBuilder discount(float discount) {
return this;
}
- /**
- * Updates the current value of
- * Generated from setter {@link BookDto#setDiscount(float) setDiscount(float discount)}
- *
- *
@@ -373,26 +261,6 @@ public BookDtoBuilder edition(short edition) {
return this;
}
- /**
- * Updates the current value of
- * Generated from setter {@link BookDto#setEdition(short) setEdition(short edition)}
- *
- * @param editionUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if
@@ -412,26 +280,6 @@ public BookDtoBuilder exactPrice(BigDecimal exactPrice) {
return this;
}
- /**
- * Updates the current value of
- * Generated from setter {@link BookDto#setExactPrice(BigDecimal) setExactPrice(BigDecimal exactPrice)}
- *
- * @param exactPriceUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if
@@ -451,32 +299,6 @@ public BookDtoBuilder genres(Set
- * Generated from setter {@link BookDto#setGenres(Set) setGenres(Set
@@ -496,32 +318,6 @@ public BookDtoBuilder isbn(String isbn) {
return this;
}
- /**
- * Updates the current value of
- * Generated from setter {@link BookDto#setIsbn(String) setIsbn(String isbn)}
- *
- *
@@ -541,32 +337,6 @@ public BookDtoBuilder lastUpdated(LocalDateTime lastUpdated) {
return this;
}
- /**
- * Updates the current value of
- * Generated from setter {@link BookDto#setLastUpdated(LocalDateTime) setLastUpdated(LocalDateTime lastUpdated)}
- *
- *
@@ -586,32 +356,6 @@ public BookDtoBuilder metadata(Map
- * Generated from setter {@link BookDto#setMetadata(Map) setMetadata(Mapcategory has not been set yet
- */
- public BookDtoBuilder categoryUpdate(UnaryOperatordiscount.
* discount in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * Example:
- *
- * {@code
- * builder.discount(3.14f).discountUpdate(Math::abs);
- * }
- *
- * @param discountUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if discount has not been set yet
- */
- public BookDtoBuilder discountUpdate(UnaryOperatoredition.
* edition in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * edition has not been set yet
- */
- public BookDtoBuilder editionUpdate(UnaryOperatorexactPrice.
* exactPrice in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * exactPrice has not been set yet
- */
- public BookDtoBuilder exactPriceUpdate(UnaryOperatorgenres.
* genres in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * Example:
- *
- * {@code
- * builder.genres(Set.of("example value")).genresUpdate(TreeSet::new);
- * }
- *
- * @param genresUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if genres has not been set yet
- */
- public BookDtoBuilder genresUpdate(UnaryOperatorisbn.
* isbn in place by applying the given operator, instead of reading it out,
- * changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * Example:
- *
- * {@code
- * builder.isbn("example value").isbnUpdate(String::trim);
- * }
- *
- * @param isbnUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if isbn has not been set yet
- */
- public BookDtoBuilder isbnUpdate(UnaryOperatorlastUpdated.
* lastUpdated in place by applying the given operator, instead of reading
- * it out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * Example:
- *
- * {@code
- * builder.lastUpdated(LocalDateTime.now()).lastUpdatedUpdate(value -> value.plusDays(1));
- * }
- *
- * @param lastUpdatedUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if lastUpdated has not been set yet
- */
- public BookDtoBuilder lastUpdatedUpdate(UnaryOperatormetadata.
* metadata in place by applying the given operator, instead of reading it
- * out, changing it and setting it again. Useful for adjustments relative to the current value, e.g. trimming,
- * upper-casing, clamping or incrementing, and in combination with the With copy-and-modify flow. The
- * value must have been set before (directly or via an existing instance).
- * Example:
- *
- * {@code
- * builder.metadata(Map.of("example value", "example value")).metadataUpdate(Map::copyOf);
- * }
- *
- * @param metadataUpdater operator applied to the current value; its result becomes the new value
- * @return current instance of builder
- * @throws IllegalStateException if metadata has not been set yet
- */
- public BookDtoBuilder metadataUpdate(UnaryOperator