KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > uk > co > jezuk > mango > binarypredicates > Or


1 package uk.co.jezuk.mango.binarypredicates;
2
3 /**
4  * @version $Id: Or.java 58 2002-06-12 11:34:16Z jez $
5  */

6 public class Or implements uk.co.jezuk.mango.BinaryPredicate
7 {
8   public Or(uk.co.jezuk.mango.BinaryPredicate pred1, uk.co.jezuk.mango.BinaryPredicate pred2) { p1_ = pred1; p2_ = pred2; }
9   public boolean test(Object JavaDoc x, Object JavaDoc y) { return p1_.test(x,y) || p2_.test(x,y); }
10
11   private uk.co.jezuk.mango.BinaryPredicate p1_;
12   private uk.co.jezuk.mango.BinaryPredicate p2_;
13 } // Or
14
Popular Tags