View Javadoc

1   /***
2    * DoubleIntervalFilter.java
3    *
4    * This file is part of the creme library.
5    * The creme library intends to ease the development effort of large
6    * applications by providing easy to use support classes.
7    *
8    * Copyright (C) 2002 Denis Bregeon
9    *
10   * This library is free software; you can redistribute it and/or
11   * modify it under the terms of the GNU Lesser General Public
12   * License as published by the Free Software Foundation; either
13   * version 2.1 of the License, or (at your option) any later version.
14   *
15   * This library is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18   * Lesser General Public License for more details.
19   *
20   * You should have received a copy of the GNU Lesser General Public
21   * License along with this library; if not, write to the Free Software
22   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23   *
24   * contact information: dbregeon@sourceforge.net
25   */
26  package org.jcreme.filters;
27  
28  /***
29   * This the specialization of the IntervalFilter for Doubles. It enables to
30   * determine if a given Double belongs to an interval.
31   * 
32   * @author $Author: dbregeon $
33   * @version $Revision: 1.2 $
34   */
35  public class DoubleIntervalFilter extends IntervalFilter {
36      static final long serialVersionUID = 4202117958954106612L;
37  
38      /***
39       * Creates a new instance of DoubleIntervalFilter
40       * 
41       * @param lowerFilter
42       *            the filter for the lower barrier of the interval.
43       * @param upperFilter
44       *            the filter for the upper barrier of the interval.
45       */
46      public DoubleIntervalFilter(DoubleOrderFilter lowerFilter,
47              DoubleOrderFilter upperFilter) {
48      		// Simply call super.
49          super(lowerFilter, upperFilter);
50      }
51  
52      /***
53       * This method enables to change the lower barrier of the interval.
54       * 
55       * @param filter
56       *            a filter to restrict the current interval.
57       */
58      public void setLowerFilter(final DoubleOrderFilter filter) {
59          super.setLowerFilter(filter);
60      }
61  
62      /***
63       * This method enables to change the upper barrier of the interval.
64       * 
65       * @param filter
66       *            a filter to restrict the current interval.
67       */
68      public void setUpperFilter(final DoubleOrderFilter filter) {
69          super.setUpperFilter(filter);
70      }
71  
72      /***
73       * This method gives access to the lower barrier.
74       * 
75       * @return the filter associated to the lower end of the interval.
76       */
77      public DoubleOrderFilter getLowerFilter() {
78          return (DoubleOrderFilter) getLowerFilterInternal();
79      }
80  
81      /***
82       * This method gives access to the upper barrier.
83       * 
84       * @return the filter associated to the upper end of the interval.
85       */
86      public DoubleOrderFilter getUpperFilter() {
87          return (DoubleOrderFilter) getUpperFilterInternal();
88      }
89  }