@@ -61,8 +61,8 @@ Now you're ready to execute commands.
6161This code sends a simple ping to nameapi to test the connection:
6262
6363``` java
64- PingerCommand command = new PingerCommand ();
65- executor. execute(command, mode, null ). get(). getPong() ; // returns "pong"
64+ PingCommand command = new PingCommand ();
65+ executor. execute(command, mode, null ). get(); // returns "pong"
6666```
6767
6868
@@ -124,7 +124,7 @@ Using the objects created earlier:
124124
125125``` java
126126PersonGenderizerCommand command = new PersonGenderizerCommand ();
127- PersonGenderizerResult result = executor. execute(command, mode, inputPerson). get();
127+ GenderizerResult result = executor. execute(command, mode, inputPerson). get();
128128```
129129
130130
@@ -150,7 +150,7 @@ The Name Formatter displays personal names in the desired form. This includes th
150150``` java
151151PersonNameFormatterCommand command = new PersonNameFormatterCommand ();
152152NaturalInputPerson person = new NaturalInputPersonBuilder (). name( NameBuilders . western(). fullname(" john f. kennedy" ). build() ). build();
153- FormatterProperties properties = new FormatterPropertiesBuilder () . build( );
153+ FormatterProperties properties = new FormatterProperties ( true );
154154PersonNameFormatterArgument argument = new PersonNameFormatterArgument (person, properties);
155155FormatterResult formatterResult = executor. execute(command, mode, argument). get();
156156```
@@ -172,7 +172,7 @@ The DEA-Detector checks email addresses against a list of known "trash domains"
172172
173173``` java
174174DisposableEmailAddressDetectorCommand command = new DisposableEmailAddressDetectorCommand ();
175- DisposableEmailAddressDetectorResult result
= executor
. execute(command, mode,
" [email protected] " );
175+ DisposableEmailAddressDetectorResult result
= executor
. execute(command, mode,
" [email protected] " )
. get() ;
176176```
177177
178178
0 commit comments