Skip to content

Commit

Permalink
Typo "MyTimes" instead of "MyItems" (openhab#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam B authored and Confectrician committed Jul 15, 2018
1 parent b7814c7 commit 5079461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configuration/rules-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ The different syntax for the generic and the objective-specific differs and is g
| `sendCommand(MyItem, new_state)` | `MyItem.sendCommand(new_state)` |

The benefit of using Objects over primitives is apparent through the following type conversions that are automatically invoked by Object as the context requires.
Using the method `MyTimes.sendCommand()` that is owned by MyItem will use the `sendCommand` method that is suitable to make the necessary type conversions.
Using the method `MyItems.sendCommand()` that is owned by MyItem will use the `sendCommand` method that is suitable to make the necessary type conversions.
For example, the `NumberItem` class would have a `sendCommand(int)`, `sendCommand(long)`, `sendCommand(float)`, `sendCommand(double)`, `sendCommand(Number)`, `sendCommand(DecimalType)`, and `sendCommand(String)` method.
Each of these separate methods is individually written to handle all of these different types of Objects.
MyItem will automatically apply the method that corresponds to the argument type.
Expand Down

0 comments on commit 5079461

Please sign in to comment.