01: /*
02: * Primitive Collections for Java.
03: * Copyright (C) 2002 Søren Bak
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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 boolean values. The
23: * comparator interface is used for defining new orderings for
24: * boolean 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 BooleanComparator {
33:
34: /**
35: * Compares two boolean values for order.
36: *
37: * @param v1
38: * the first boolean value in the comparison.
39: *
40: * @param v2
41: * the second boolean value in the comparison.
42: *
43: * @return a negative int value if <tt>v1 < v2</tt>,
44: * <tt>0</tt> if <tt>v1</tt> is equal to <tt>v2</tt>,
45: * or a positive integer if <tt>v1 > v2</tt>.
46: */
47: int compare(boolean v1, boolean v2);
48:
49: }
|