public String getVersion() {
        long result = username.hashCode(); // Helps to prevent identical version identifiers when rosters contain the same items.
        result += rosterItems.values().stream().mapToInt(RosterItem::rosterVerHashCode).sum();
        result += implicitFrom.hashCode();
        return Long.toString(result);
    }
Generates a hash code based on only those fields that are relevant for Roster Versioning (as defined in RFC 6121 section 2.6).

@return A hash code
xmppserver/src/main/java/org/jivesoftware/openfire/roster/Roster.java