public String transform(UnicodeCandidate unicodeCandidate) {
        if (emojisToKeep.contains(unicodeCandidate.getEmoji())) {
          return unicodeCandidate.getEmoji().getUnicode() +
            unicodeCandidate.getFitzpatrickUnicode();
        }
        return "";
      }
Removes all the emojis in a String except a provided set

@param str          the string to process
@param emojisToKeep the emojis to keep in this string

@return the string without the emojis that were removed
src/main/java/com/vdurmont/emoji/EmojiParser.java