Last active
August 29, 2015 14:16
-
-
Save Busata/5671eb19a942f3e269e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Without: | |
this.actionManager.registerAction(Input.Keys.F1,new Command() { | |
@Override | |
public void execute() { | |
System.out.println(isMenuShown); | |
} | |
}); | |
With lambdas: | |
this.actionManager.registerAction(Input.Keys.F1, () -> System.out.println(isMenuShown)); | |
With parameters & body | |
this.actionManager.registerAction(Input.Keys.F1, (foo, bar) -> { | |
System.out.println(foo); | |
System.out.println(bar); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment