KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > bak > pcj > FloatComparator


1 /*
2  * Primitive Collections for Java.
3  * Copyright (C) 2002 Søren Bak
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package bak.pcj;
20
21 /**
22  * This interface represents comparators of float values. The
23  * comparator interface is used for defining new orderings for
24  * float values.
25  *
26  * @see java.util.Comparator
27  *
28  * @author Søren Bak
29  * @version 1.0 2002/29/12
30  * @since 1.0
31  */

32 public interface FloatComparator {
33
34     /**
35      * Compares two float values for order.
36      *
37      * @param v1
38      * the first float value in the comparison.
39      *
40      * @param v2
41      * the second float value in the comparison.
42      *
43      * @return a negative int value if <tt>v1 &lt; v2</tt>,
44      * <tt>0</tt> if <tt>v1</tt> is equal to <tt>v2</tt>,
45      * or a positive integer if <tt>v1 &gt; v2</tt>.
46      */

47     int compare(float v1, float v2);
48
49 }
Popular Tags