Coverage Report - org.mule.transport.xmpp.filters.XmppNotFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
XmppNotFilter
0%
0/14
0%
0/6
0
 
 1  
 /*
 2  
  * $Id: XmppNotFilter.java 19191 2010-08-25 21:05:23Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.transport.xmpp.filters;
 12  
 
 13  
 import org.mule.util.ClassUtils;
 14  
 
 15  
 import org.jivesoftware.smack.filter.NotFilter;
 16  
 import org.jivesoftware.smack.filter.PacketFilter;
 17  
 
 18  
 /**
 19  
  * <code>XmppNotFilter</code> an Xmpp NOT filter
 20  
  */
 21  
 public class XmppNotFilter extends AbstractXmppFilter
 22  
 {
 23  
     private volatile PacketFilter filter;
 24  
 
 25  
     public XmppNotFilter()
 26  
     {
 27  0
         super();
 28  0
     }
 29  
 
 30  
     public XmppNotFilter(PacketFilter filter)
 31  0
     {
 32  0
         this.filter = filter;
 33  0
     }
 34  
 
 35  
     public void setFilter(PacketFilter filter)
 36  
     {
 37  0
         this.filter = filter;
 38  0
     }
 39  
 
 40  
     public PacketFilter getFilter()
 41  
     {
 42  0
         return filter;
 43  
     }
 44  
 
 45  
     @Override
 46  
     protected PacketFilter createFilter()
 47  
     {
 48  0
         return new NotFilter(filter);
 49  
     }
 50  
 
 51  
     @Override
 52  
     public boolean equals(Object obj)
 53  
     {
 54  0
         if (this == obj) return true;
 55  0
         if (obj == null || getClass() != obj.getClass()) return false;
 56  
 
 57  0
         final XmppNotFilter other = (XmppNotFilter) obj;
 58  0
         return ClassUtils.equal(filter, other.filter);
 59  
     }
 60  
 
 61  
     @Override
 62  
     public int hashCode()
 63  
     {
 64  0
         return ClassUtils.hash(new Object[]{this.getClass(), filter});
 65  
     }
 66  
 }