1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.observation.event.filter

File AlwaysMatchingEventFilter.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
4
5
1
76
31
5
1.25
0.8
5
1

Classes

Class Line # Actions
AlwaysMatchingEventFilter 29 4 0% 5 0
1.0100%
 

Contributing tests

This file is covered by 103 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.observation.event.filter;
21   
22    import java.io.Serializable;
23   
24    /**
25    * An {@link EventFilter} that always matches another event filter.
26    *
27    * @version $Id: 23993703e89d0167dc90e6e564cc37956b99f9be $
28    */
 
29    public class AlwaysMatchingEventFilter implements EventFilter, Serializable
30    {
31    /**
32    * Unique instance of {@link AlwaysMatchingEventFilter}.
33    *
34    * @since 6.0M1
35    */
36    public static final AlwaysMatchingEventFilter INSTANCE = new AlwaysMatchingEventFilter();
37   
38    /**
39    * The version identifier for this Serializable class. Increment only if the <i>serialized</i> form of the class
40    * changes.
41    */
42    private static final long serialVersionUID = 1L;
43   
44    /**
45    * @deprecated since 6.0M1, use {@link #INSTANCE} instead
46    */
 
47  81 toggle @Deprecated
48    public AlwaysMatchingEventFilter()
49    {
50   
51    }
52   
 
53  1 toggle @Override
54    public String getFilter()
55    {
56  1 return ".*";
57    }
58   
 
59  88158 toggle @Override
60    public boolean matches(EventFilter eventFilter)
61    {
62  88156 return true;
63    }
64   
 
65  5 toggle @Override
66    public boolean equals(Object obj)
67    {
68  5 return obj != null && obj.getClass() == getClass();
69    }
70   
 
71  5 toggle @Override
72    public int hashCode()
73    {
74  5 return 0;
75    }
76    }