From 119abf3ee4552828ad32be9b8c34479d95e95dfd Mon Sep 17 00:00:00 2001 From: Conny Hansson <71334757+Conhan93@users.noreply.github.com> Date: Fri, 8 Oct 2021 19:34:47 +0200 Subject: [PATCH] Doc: Corrected a few spelling mistakes (#1840) --- active-object/README.md | 8 ++++---- .../java/com/iluwatar/activeobject/ActiveCreature.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/active-object/README.md b/active-object/README.md index 6e974034a..395c7f59f 100644 --- a/active-object/README.md +++ b/active-object/README.md @@ -11,7 +11,7 @@ tags: ## Intent -The active object design pattern decouples method execution from method invocation for objects that each reside in their thread of control. The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests. +The active object design pattern decouples method execution from method invocation for objects that each reside in their thread of control. The goal is to introduce concurrency, by using asynchronous method invocation, and a scheduler for handling requests. ## Explanation @@ -70,7 +70,7 @@ public abstract class ActiveCreature{ requests.put(new Runnable() { @Override public void run() { - logger.info("{} has started to roam and the wastelands.",name()); + logger.info("{} has started to roam the wastelands.",name()); } } ); @@ -82,7 +82,7 @@ public abstract class ActiveCreature{ } ``` -We can see that any class that will extend the ActiveCreature class will have its own thread of control to execute and invocate methods. +We can see that any class that will extend the ActiveCreature class will have its own thread of control to invoke and execute methods. For example, the Orc class: @@ -96,7 +96,7 @@ public class Orc extends ActiveCreature { } ``` -Now, we can create multiple creatures such as Orcs, tell them to eat and roam and they will execute it on their own thread of control: +Now, we can create multiple creatures such as Orcs, tell them to eat and roam, and they will execute it on their own thread of control: ```java public static void main(String[] args) { diff --git a/active-object/src/main/java/com/iluwatar/activeobject/ActiveCreature.java b/active-object/src/main/java/com/iluwatar/activeobject/ActiveCreature.java index 479dc0643..9be60505d 100644 --- a/active-object/src/main/java/com/iluwatar/activeobject/ActiveCreature.java +++ b/active-object/src/main/java/com/iluwatar/activeobject/ActiveCreature.java @@ -82,7 +82,7 @@ public abstract class ActiveCreature { } /** - * Roam in the wastelands. + * Roam the wastelands. * @throws InterruptedException due to firing a new Runnable. */ public void roam() throws InterruptedException {