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