Skip to content

Instantly share code, notes, and snippets.

@anna-is-cute
Created September 28, 2015 17:52
Show Gist options
  • Save anna-is-cute/07d5cfcd902966ee5e25 to your computer and use it in GitHub Desktop.
Save anna-is-cute/07d5cfcd902966ee5e25 to your computer and use it in GitHub Desktop.
@Nullable
public final BaseCommand getCommand(@NotNull final String name) {
Intrinsics.checkParameterIsNotNull(name, "name");
BaseCommand commandByAlias;
if ((commandByAlias = this.commands.get(name)) == null) {
commandByAlias = this.getCommandByAlias(name);
}
return commandByAlias;
}
public fun getCommand(name: String): BaseCommand? = this.commands[name] ?: this.getCommandByAlias(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment