@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(userJID.toString());    // userJID
        size += CacheSizes.sizeOfString(name);                  // name
        size += CacheSizes.sizeOfBoolean();                     // isDefault
        size += CacheSizes.sizeOfCollection(items);             // items of the list
        return size;
    }
Sets the new list items based on the specified Element. The Element must contain
a list of item elements.

@param listElement the element containing a list of items.
@param notify true if a provicy list modified event will be triggered.
xmppserver/src/main/java/org/jivesoftware/openfire/privacy/PrivacyList.java