Skip to content

Commit 92873f4

Browse files
committed
Remove configureAndBuild-method
As the method wasn't being used and can easily be replicated with the existing API it can easily be removed.
1 parent beb547b commit 92873f4

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

api/src/main/java/net/quickwrite/fluent4j/util/Builder.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
11
package net.quickwrite.fluent4j.util;
22

3-
import java.util.function.Consumer;
4-
53
/**
64
* The Builder interface represents a generic builder.
75
*
86
* @param <R> the type to be built
97
*/
108
public interface Builder<R> {
11-
12-
/**
13-
* Configures the builder using the provided consumer and then builds the object.
14-
*
15-
* @param builder the builder instance
16-
* @param consumer the consumer to configure the builder
17-
* @param <R> the type to be built
18-
* @param <B> the builder type
19-
* @return the built object
20-
*/
21-
static <R, B extends Builder<R>> R configureAndBuild(final B builder, final Consumer<? super B> consumer) {
22-
if (consumer != null) {
23-
consumer.accept(builder);
24-
}
25-
return builder.build();
26-
}
27-
289
/**
2910
* Builds the object.
3011
*

0 commit comments

Comments
 (0)