directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r711645 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
Date Wed, 05 Nov 2008 18:26:17 GMT
Author: seelmann
Date: Wed Nov  5 10:26:17 2008
New Revision: 711645

URL: http://svn.apache.org/viewvc?rev=711645&view=rev
Log:
Added convenience constructor, improved Javadoc

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java?rev=711645&r1=711644&r2=711645&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
Wed Nov  5 10:26:17 2008
@@ -32,9 +32,9 @@
 public class NotNode extends BranchNode
 {
     /**
-     * Creates a NotNode using a logical operator and a list of children.
+     * Creates a NotNode using a logical NOT operator and a list of children.
      * 
-     * A Not node should contain only one child
+     * A Not node could contain only one child.
      * 
      * @param childList the child nodes under this branch node.
      */
@@ -50,11 +50,27 @@
 
 
     /**
+     * Creates a NotNode using a logical NOT operator and the given child.
+     * 
+     * @param child the child node under this branch node.
+     */
+    public NotNode( ExprNode child )
+    {
+        super( AssertionType.NOT );
+
+        if ( child != null )
+        {
+            addNode( child );
+        }
+    }
+
+
+    /**
      * Creates an empty NotNode
      */
     public NotNode()
     {
-        this( null );
+        this( (ExprNode)null );
     }
 
     /**



Mime
View raw message