Coverage Report - org.mule.routing.filters.logic.OrFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
OrFilter
0%
0/10
0%
0/4
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.routing.filters.logic;
 8  
 
 9  
 import org.mule.api.MuleMessage;
 10  
 import org.mule.api.routing.filter.Filter;
 11  
 
 12  
 import java.util.List;
 13  
 
 14  
 /**
 15  
  * <code>OrFilter</code> accepts if any of the filters accept the message
 16  
  */
 17  
 
 18  
 public class OrFilter extends AbstractFilterCollection
 19  
 {
 20  
     public OrFilter()
 21  
     {
 22  0
         super();
 23  0
     }
 24  
 
 25  
     public OrFilter(Filter... filters)
 26  
     {
 27  0
         super(filters);
 28  0
     }
 29  
 
 30  
     public OrFilter(List<Filter> filters)
 31  
     {
 32  0
         super(filters);
 33  0
     }
 34  
 
 35  
     public boolean accept(MuleMessage message)
 36  
     {
 37  0
         for (Filter filter : getFilters())
 38  
         {
 39  0
             if(filter.accept(message))
 40  
             {
 41  0
                 return true;
 42  
             }
 43  
         }
 44  0
         return false;
 45  
     }
 46  
 }