@Override
    public int getCachedSize()
        throws CannotCalculateSizeException {
        // Approximate the size of the object in bytes by calculating the size
        // of each field.
        int size = 0;
        size += CacheSizes.sizeOfObject();              // overhead of object
        size += CacheSizes.sizeOfString(name);
        size += CacheSizes.sizeOfString(description);
        size += CacheSizes.sizeOfMap(properties);

        size += CacheSizes.sizeOfCollection(members);
        size += CacheSizes.sizeOfCollection(administrators);

        return size;
    }
Returns true if the provided username belongs to a user of the group.

@param username the username to check.
@return true if the provided username belongs to a user of the group.
xmppserver/src/main/java/org/jivesoftware/openfire/group/Group.java