Ignore maven’s “target/” directory.
[jFCPlib.git] / src / main / java / net / pterodactylus / util / filter / Filter.java
1 /*
2  * jFCPlib - Filter.java - Copyright © 2009 David Roden
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18 package net.pterodactylus.util.filter;
19
20 /**
21  * Interface for a filter that determines whether a certain action can be
22  * performed on an object based on its properties.
23  *
24  * @param <T>
25  *            The type of the filtered object
26  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
27  */
28 public interface Filter<T> {
29
30         /**
31          * Runs the given object through this filter and return whether the object
32          * matches this filter or not.
33          *
34          * @param object
35          *            The object to analyse
36          * @return <code>true</code> if the object matched this filter,
37          *         <code>false</code> otherwise
38          */
39         public boolean filterObject(T object);
40
41 }