public Matches isEmoji ( char [ ] sequence ) { if ( sequence == null ) { return Matches . POSSIBLY ; } Node tree = root ; for ( char c : sequence ) { if ( ! tree . hasChild ( c ) ) { return Matches . IMPOSSIBLE ; } tree = tree . getChild ( c ) ; } return tree . isEndOfEmoji ( ) ? Matches . EXACTLY : Matches . POSSIBLY ; }
Checks if sequence of chars contain an emoji .