@Override
    public int getCachedSize() {
        // 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.sizeOfInt();                         // order
        size += CacheSizes.sizeOfBoolean();                     // allow
        //size += CacheSizes.sizeOfString(jidValue.toString());   // type
        if (jidValue != null ) {
            size += CacheSizes.sizeOfString(jidValue.toString()); // jidValue
        }
        //size += CacheSizes.sizeOfString(name);                  // subscriptionValue
        if (groupValue != null) {
            size += CacheSizes.sizeOfString(groupValue);        // groupValue
        }
        size += CacheSizes.sizeOfBoolean();                     // filterEverything
        size += CacheSizes.sizeOfBoolean();                     // filterIQ
        size += CacheSizes.sizeOfBoolean();                     // filterMessage
        size += CacheSizes.sizeOfBoolean();                     // filterPresence_in
        size += CacheSizes.sizeOfBoolean();                     // filterPresence_out
        return size;
    }
Returns true if the packet to analyze matches the condition defined by this rule.
Variables involved in the analysis are: type (e.g. jid, group, etc.), value (based
on the type) and granular control that defines which type of packets should be
considered.

@param packet the packet to analyze if matches the rule's condition.
@param roster the roster of the owner of the privacy list.
@param userJID the JID of the owner of the privacy list.
@return true if the packet to analyze matches the condition defined by this rule.
xmppserver/src/main/java/org/jivesoftware/openfire/privacy/PrivacyItem.java