public boolean isRosterItem(JID user) {
        // Optimization: Check if the contact has a FROM subscription due to shared groups
        // (only when not present in the rosterItems collection)
        return rosterItems.containsKey(user.toBareJID()) || getImplicitRosterItem(user) != null;
    }
Returns true if the specified user is a member of the roster, false otherwise.

@param user the user object to check.
@return true if the specified user is a member of the roster, false otherwise.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/Roster.java