directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r723049 - in /directory/apacheds/branches/apacheds-mina2: core-splay/src/main/java/org/apache/directory/server/core/splay/ jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
Date Wed, 03 Dec 2008 20:05:01 GMT
Author: elecharny
Date: Wed Dec  3 12:05:01 2008
New Revision: 723049

URL: http://svn.apache.org/viewvc?rev=723049&view=rev
Log:
Replaced tabs by 4 spaces

Modified:
    directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/LinkedBinaryNode.java
    directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/SplayTree.java
    directory/apacheds/branches/apacheds-mina2/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java

Modified: directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/LinkedBinaryNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/LinkedBinaryNode.java?rev=723049&r1=723048&r2=723049&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/LinkedBinaryNode.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/LinkedBinaryNode.java
Wed Dec  3 12:05:01 2008
@@ -43,44 +43,44 @@
     }
 
 
-	public LinkedBinaryNode<T> getLeft() {
-		return left;
-	}
-
-
-	public LinkedBinaryNode<T> getRight() {
-		return right;
-	}
-
-	public T getKey() {
-		return key;
-	}
-
-	public boolean isLeaf()
-	{
-		return ( right == null && left == null );
-	}
-	
-	/**
-	 * This method is used for internal purpose only while pretty printing the tree.<br>
-	 * @return the depth at the this node
-	 */
-	public int getDepth() {
-		return depth;
-	}
+    public LinkedBinaryNode<T> getLeft() {
+        return left;
+    }
+
+
+    public LinkedBinaryNode<T> getRight() {
+        return right;
+    }
+
+    public T getKey() {
+        return key;
+    }
+
+    public boolean isLeaf()
+    {
+        return ( right == null && left == null );
+    }
+    
+    /**
+     * This method is used for internal purpose only while pretty printing the tree.<br>
+     * @return the depth at the this node
+     */
+    public int getDepth() {
+        return depth;
+    }
 
     /**
      * This method is used for internal purpose only while pretty printing the tree.<br>
      * @param depth value representing the depth of the this node
      */
-	public void setDepth( int depth ) {
-		this.depth = depth;
-	}
-
-	@Override
-	public String toString() {
-	    return "[" + key + "]";
-	}
+    public void setDepth( int depth ) {
+        this.depth = depth;
+    }
+
+    @Override
+    public String toString() {
+        return "[" + key + "]";
+    }
     
     
 }

Modified: directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/SplayTree.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/SplayTree.java?rev=723049&r1=723048&r2=723049&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/SplayTree.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/core-splay/src/main/java/org/apache/directory/server/core/splay/SplayTree.java
Wed Dec  3 12:05:01 2008
@@ -74,12 +74,12 @@
         if( last == null )
         {
           first.next = n;
-	      n.previous = first;
+          n.previous = first;
         }
         else
         {
-        	last.next = n;
-        	n.previous = last;
+            last.next = n;
+            n.previous = last;
         }
         
         last = n;
@@ -134,24 +134,24 @@
         
         if( deleteNode == first )
         {
-        	temp = first.next;
-        	
-        	if( temp != null )
-        	{
-        		first = temp;
-        	}
-        	else
-        	{
-        		first = last = null;
-        	}
-        	
+            temp = first.next;
+            
+            if( temp != null )
+            {
+                first = temp;
+            }
+            else
+            {
+                first = last = null;
+            }
+            
         }
         else if( deleteNode == last )
         {
-        	temp = last.previous;
-       		temp.next = null;
-       		
-        	last = temp;
+            temp = last.previous;
+               temp.next = null;
+               
+            last = temp;
         }
         else
         {
@@ -358,61 +358,61 @@
 
 
     public LinkedBinaryNode<K> getRoot() {
-		return root;
-	}
+        return root;
+    }
 
 
     /**
      * Prints the contents of splay tree in pretty format
      */
     public void printTree() {
-    	
-    	if( isEmpty() )
-    	{
-    		System.out.println( "Tree is empty" );
-    		return;
-    	}
-    	
-		getRoot().setDepth( 0 );
-
-		System.out.println( getRoot() );
-		
-		visit( getRoot().getRight(), getRoot() );
-		
-		visit( getRoot().getLeft(), getRoot() );
-	}
-	
-	private void visit( LinkedBinaryNode<K> node, LinkedBinaryNode<K> parentNode
) 
-	{
-		if( node == null )
-		{
-			return;
-		}
-		
-		if( !node.isLeaf() )
-		{
-			node.setDepth( parentNode.getDepth() + 1 );
-		}
-		
-		for( int i=0; i < parentNode.getDepth(); i++ )
-		{
-			System.out.print( "|  " );
-		}
-
-		System.out.println( "|--" + node );
-		
-		if ( node.getRight() != null )
-		{
-			visit( node.getRight(), node );
-		}
-		
-		if( node.getLeft() != null )
-		{
-			visit( node.getLeft(), node );
-		}
-	}
+        
+        if( isEmpty() )
+        {
+            System.out.println( "Tree is empty" );
+            return;
+        }
+        
+        getRoot().setDepth( 0 );
+
+        System.out.println( getRoot() );
+        
+        visit( getRoot().getRight(), getRoot() );
+        
+        visit( getRoot().getLeft(), getRoot() );
+    }
+    
+    private void visit( LinkedBinaryNode<K> node, LinkedBinaryNode<K> parentNode
) 
+    {
+        if( node == null )
+        {
+            return;
+        }
+        
+        if( !node.isLeaf() )
+        {
+            node.setDepth( parentNode.getDepth() + 1 );
+        }
+        
+        for( int i=0; i < parentNode.getDepth(); i++ )
+        {
+            System.out.print( "|  " );
+        }
+
+        System.out.println( "|--" + node );
+        
+        if ( node.getRight() != null )
+        {
+            visit( node.getRight(), node );
+        }
+        
+        if( node.getLeft() != null )
+        {
+            visit( node.getLeft(), node );
+        }
+    }
 
-	// test code stolen from Weiss
+    // test code stolen from Weiss
     public static void main( String[] args )
     {
         SplayTree<Integer> t = new SplayTree<Integer>( new Comparator<Integer>()


Modified: directory/apacheds/branches/apacheds-mina2/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java?rev=723049&r1=723048&r2=723049&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
Wed Dec  3 12:05:01 2008
@@ -327,7 +327,7 @@
         {
             assertTrue( table.hasLessOrEqual( 1, 2 ) );
             fail( "Should never get here since no dups tables " +
-            		"freak when they cannot find a value comparator" );
+                  "freak when they cannot find a value comparator" );
         } 
         catch ( UnsupportedOperationException e )
         {



Mime
View raw message