From 0f9f3b90c27ed805e48f30036253b5e056d3e4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Sat, 12 Jun 2021 18:49:40 +0300 Subject: [PATCH] Fixes to builder pattern grammar --- builder/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/README.md b/builder/README.md index 9db1b9e93..811e720b1 100644 --- a/builder/README.md +++ b/builder/README.md @@ -16,11 +16,11 @@ process can create different representations. ## Explanation -Real world example +Real-world example > Imagine a character generator for a role-playing game. The easiest option is to let the computer > create the character for you. If you want to manually select the character details like -> profession, gender, hair color etc. the character generation becomes a step-by-step process that +> profession, gender, hair color, etc. the character generation becomes a step-by-step process that > completes when all the selections are ready. In plain words @@ -49,7 +49,7 @@ anti-pattern. **Programmatic Example** -The sane alternative is to use the Builder pattern. First of all we have our hero that we want to +The sane alternative is to use the Builder pattern. First of all, we have our hero that we want to create: ```java @@ -134,7 +134,7 @@ Use the Builder pattern when * The algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled * The construction process must allow different representations for the object that's constructed -## Real world examples +## Real-world examples * [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html) * [java.nio.ByteBuffer](http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#put-byte-) as well as similar buffers such as FloatBuffer, IntBuffer and so on.