ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r290804 - in /ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors: And.java Majority.java None.java Or.java ResourceSelectorContainer.java
Date Wed, 21 Sep 2005 19:46:44 GMT
Author: mbenson
Date: Wed Sep 21 12:46:36 2005
New Revision: 290804

URL: http://svn.apache.org/viewcvs?rev=290804&view=rev
Log:
add array constructors for simplified coding of nested selectors

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/And.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/None.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Or.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/And.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/And.java?rev=290804&r1=290803&r2=290804&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/And.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/And.java Wed Sep
21 12:46:36 2005
@@ -27,6 +27,20 @@
 public class And extends ResourceSelectorContainer implements ResourceSelector {
 
     /**
+     * Default constructor.
+     */
+    public And() {
+    }
+
+    /**
+     * Convenience constructor.
+     * @param r the ResourceSelector[] to add.
+     */
+    public And(ResourceSelector[] r) {
+        super(r);
+    }
+
+    /**
      * Return true if this Resource is selected.
      * @param r the Resource to check.
      * @return whether the Resource was selected.

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java?rev=290804&r1=290803&r2=290804&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Majority.java Wed
Sep 21 12:46:36 2005
@@ -30,6 +30,20 @@
     private boolean tie = true;
 
     /**
+     * Default constructor.
+     */
+    public Majority() {
+    }
+
+    /**
+     * Convenience constructor.
+     * @param r the ResourceSelector[] to add.
+     */
+    public Majority(ResourceSelector[] r) {
+        super(r);
+    }
+
+    /**
      * Set whether ties are allowed.
      * @param b whether a tie is a pass.
      */

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/None.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/None.java?rev=290804&r1=290803&r2=290804&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/None.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/None.java Wed Sep
21 12:46:36 2005
@@ -28,6 +28,20 @@
     extends ResourceSelectorContainer implements ResourceSelector {
 
     /**
+     * Default constructor.
+     */
+    public None() {
+    }
+
+    /**
+     * Convenience constructor.
+     * @param r the ResourceSelector[] to add.
+     */
+    public None(ResourceSelector[] r) {
+        super(r);
+    }
+
+    /**
      * Return true if this Resource is selected.
      * @param r the Resource to check.
      * @return whether the Resource was selected.

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Or.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Or.java?rev=290804&r1=290803&r2=290804&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Or.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Or.java Wed Sep
21 12:46:36 2005
@@ -27,6 +27,20 @@
 public class Or extends ResourceSelectorContainer implements ResourceSelector {
 
     /**
+     * Default constructor.
+     */
+    public Or() {
+    }
+
+    /**
+     * Convenience constructor.
+     * @param r the ResourceSelector[] to add.
+     */
+    public Or(ResourceSelector[] r) {
+        super(r);
+    }
+
+    /**
      * Return true if this Resource is selected.
      * @param r the Resource to check.
      * @return whether the Resource was selected.

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java?rev=290804&r1=290803&r2=290804&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/ResourceSelectorContainer.java
Wed Sep 21 12:46:36 2005
@@ -34,6 +34,22 @@
     private Vector v = new Vector();
 
     /**
+     * Default constructor.
+     */
+    public ResourceSelectorContainer() {
+    }
+
+    /**
+     * Construct a new ResourceSelectorContainer with the specified array of selectors.
+     * @param r the ResourceSelector[] to add.
+     */
+    public ResourceSelectorContainer(ResourceSelector[] r) {
+        for (int i = 0; i < r.length; i++) {
+            add(r[i]);
+        }
+    }
+
+    /**
      * Add a ResourceSelector to the container.
      * @param s the ResourceSelector to add.
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message