View Javadoc

1   /*
2    * @(#) Filterinterface.java Oct 26, 2004
3    * 
4    * Copyright (c) 2004 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
5    * the Netherlands All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the General Public License
9    */
10  package nl.tudelft.simulation.language.filters;
11  
12  /***
13   * The FilterInterface is a general interface for all filters in DSOL. Filters
14   * can be based on xY combinations, class information ,etc. etc. The API of
15   * implementing filters will explain what it expects as input.
16   * <p>
17   * (c) copyright 2004 <a href="http://www.simulation.tudelft.nl/dsol/">Delft
18   * University of Technology </a>, the Netherlands. <br>
19   * See for project information <a href="http://www.simulation.tudelft.nl/dsol/">
20   * www.simulation.tudelft.nl/dsol </a> <br>
21   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
22   * License (GPL) </a>, no warranty <br>
23   * 
24   * @author <a
25   *         href="http://web.eur.nl/fbk/dep/dep1/Introduction/Staff/People/Lang">Niels
26   *         Lang </a><a
27   *         href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
28   *         Jacobs </a>
29   * @version 1.0 Oct 26, 2004
30   * @since 1.2
31   */
32  public interface Filterinterface
33  {
34  	/***
35  	 * a filter defines whether to accept a value in a chart
36  	 * 
37  	 * @param entry the entry to filter
38  	 * @return whether to accept this entry
39  	 */
40  	public boolean accept(Object entry);
41  
42  	/***
43  	 * inverts the filter
44  	 * 
45  	 * @param inverted whether to invert the filter
46  	 */
47  	public void setInverted(boolean inverted);
48  
49  	/***
50  	 * is the filter inverted?
51  	 * 
52  	 * @return whether the filter is inverted.
53  	 */
54  	public boolean isInverted();
55  
56  	/***
57  	 * returns a string representation of the criterium
58  	 * 
59  	 * @return the string representing the criterium
60  	 */
61  	public String getCriterium();
62  
63  	/***
64  	 * adds filter to this filter and returns the composed filter
65  	 * 
66  	 * @param filter the filter to add
67  	 * @return the composed filter
68  	 */
69  	public Filterinterface add(Filterinterface filter);
70  
71  	/***
72  	 * creates a new composite filter which is one or two
73  	 * 
74  	 * @param filter the filter to add
75  	 * @return the composed filter
76  	 */
77  	public Filterinterface or(Filterinterface filter);
78  }