Coverage Report - org.mule.routing.filters.logic.NotFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
NotFilter
100%
9/9
75%
3/4
1
 
 1  
 /*
 2  
  * $Id: NotFilter.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.routing.filters.logic;
 12  
 
 13  
 import org.mule.umo.UMOFilter;
 14  
 import org.mule.umo.UMOMessage;
 15  
 
 16  
 /**
 17  
  * <code>NotFilter</code> accepts if the filter does not accept.
 18  
  */
 19  
 
 20  
 public class NotFilter implements UMOFilter
 21  
 {
 22  
     private UMOFilter filter;
 23  
 
 24  
     public NotFilter()
 25  
     {
 26  4
         super();
 27  4
     }
 28  
 
 29  
     public NotFilter(UMOFilter filter)
 30  2
     {
 31  2
         this.filter = filter;
 32  2
     }
 33  
 
 34  
     public UMOFilter getFilter()
 35  
     {
 36  4
         return filter;
 37  
     }
 38  
 
 39  
     public void setFilter(UMOFilter filter)
 40  
     {
 41  2
         this.filter = filter;
 42  2
     }
 43  
 
 44  
     public boolean accept(UMOMessage message)
 45  
     {
 46  8
         return (filter != null ? !filter.accept(message) : false);
 47  
     }
 48  
 
 49  
 }