Skip to content

Commit

Permalink
Update commands method reference to include example of static method (#…
Browse files Browse the repository at this point in the history
…2673)

Include static method reference
  • Loading branch information
ArchdukeTim authored Jul 28, 2024
1 parent 204ae0d commit 64d7bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/docs/software/commandbased/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In order to provide a concise inline syntax, the command-based library often acc
Method References (Java)
^^^^^^^^^^^^^^^^^^^^^^^^

In Java, a reference to a function that can be passed as a parameter is called a method reference. The general syntax for a method reference is ``object::method``. Note that no method parameters are included, since the method *itself* is passed. The method is not being called - it is being passed to another piece of code (in this case, a command) so that *that* code can call it when needed. For further information on method references, see :ref:`docs/software/basic-programming/functions-as-data:Method References`.
In Java, a reference to a function that can be passed as a parameter is called a method reference. The general syntax for a method reference is ``object::method`` or ``Class::staticMethod``. Note that no method parameters are included, since the method *itself* is passed. The method is not being called - it is being passed to another piece of code (in this case, a command) so that *that* code can call it when needed. For further information on method references, see :ref:`docs/software/basic-programming/functions-as-data:Method References`.

Lambda Expressions (Java)
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 64d7bb9

Please sign in to comment.