[Mulgara-svn] r484 - branches/nw-interface/src/jar/util/java/org/mulgara/util

pag at mulgara.org pag at mulgara.org
Thu Oct 18 22:00:27 UTC 2007


Author: pag
Date: 2007-10-18 17:00:27 -0500 (Thu, 18 Oct 2007)
New Revision: 484

Added:
   branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester.java
   branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester2.java
Log:
Added for use as functor templates

Added: branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester.java
===================================================================
--- branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester.java	2007-10-18 18:33:45 UTC (rev 483)
+++ branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester.java	2007-10-18 22:00:27 UTC (rev 484)
@@ -0,0 +1,29 @@
+/**
+ * The contents of this file are subject to the Open Software License
+ * Version 3.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.opensource.org/licenses/osl-3.0.txt
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ */
+package org.mulgara.util;
+
+/**
+ * Functor interface for testing an object in some arbitrary way.
+ * @created Oct 18, 2007
+ * @author Paul Gearon
+ * @copyright &copy; 2007 <a href="mailto:pgearon at users.sourceforge.net">Paul Gearon</a>
+ * @licence <a href="{@docRoot}/../../LICENCE.txt">Open Software License v3.0</a>
+ */
+public interface Tester {
+
+  /**
+   * Perform a test on an object, returning <code>true</code> if it passes.
+   * @param o The object to test
+   * @return <code>true</code> for a successful test.
+   */
+  public boolean test(Object o);
+}

Added: branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester2.java
===================================================================
--- branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester2.java	2007-10-18 18:33:45 UTC (rev 483)
+++ branches/nw-interface/src/jar/util/java/org/mulgara/util/Tester2.java	2007-10-18 22:00:27 UTC (rev 484)
@@ -0,0 +1,30 @@
+/**
+ * The contents of this file are subject to the Open Software License
+ * Version 3.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.opensource.org/licenses/osl-3.0.txt
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ */
+package org.mulgara.util;
+
+/**
+ * Functor interface for testing a pair of objects in some arbitrary way.
+ * @created Oct 18, 2007
+ * @author Paul Gearon
+ * @copyright &copy; 2007 <a href="mailto:pgearon at users.sourceforge.net">Paul Gearon</a>
+ * @licence <a href="{@docRoot}/../../LICENCE.txt">Open Software License v3.0</a>
+ */
+public interface Tester2 <T1,T2> {
+
+  /**
+   * Perform a test on an a pair of objects, returning <code>true</code> if it passes.
+   * @param o1 The first object to test.
+   * @param o2 The second object to test.
+   * @return <code>true</code> for a successful test.
+   */
+  public boolean test(T1 o1, T2 o2);
+}




More information about the Mulgara-svn mailing list