-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance when getting emoji by alias(#17)
Improve performance for getByAlias and sibling methods
- Loading branch information
Showing
3 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.fellbaum.jemoji; | ||
|
||
import java.util.Collection; | ||
import java.util.function.Function; | ||
|
||
enum AliasGroup { | ||
DISCORD(Emoji::getDiscordAliases), | ||
GITHUB(Emoji::getGithubAliases), | ||
SLACK(Emoji::getSlackAliases); | ||
|
||
private final Function<Emoji, Collection<String>> aliasCollectionSupplier; | ||
|
||
AliasGroup(Function<Emoji, Collection<String>> aliasCollectionSupplier) { | ||
this.aliasCollectionSupplier = aliasCollectionSupplier; | ||
} | ||
|
||
public Function<Emoji, Collection<String>> getAliasCollectionSupplier() { | ||
return aliasCollectionSupplier; | ||
} | ||
} |
This file contains 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