code: public static String removeAllEmojisExcept(
      String str,
      final Collection<Emoji> emojisToKeep
    ) {
      EmojiTransformer emojiTransformer = new EmojiTransformer() {
        public String transform(UnicodeCandidate unicodeCandidate) {
          if (emojisToKeep.contains(unicodeCandidate.getEmoji())) {
            return unicodeCandidate.getEmoji().getUnicode() +
              unicodeCandidate.getFitzpatrickUnicode();
          }
          return "";
        }
      };
  
      return parseFromUnicode(str, emojiTransformer);
    }
docs: 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