/[classpath]/classpath/java/util/TreeMap.java
ViewVC logotype

Diff of /classpath/java/util/TreeMap.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23.2.2 by gnu_andrew, Wed Jan 12 20:06:43 2005 UTC revision 1.23.2.3 by gnu_andrew, Fri Jan 14 10:24:16 2005 UTC
# Line 130  public class TreeMap<K, V> extends Abstr Line 130  public class TreeMap<K, V> extends Abstr
130    /**    /**
131     * The root node of this TreeMap.     * The root node of this TreeMap.
132     */     */
133    private transient Node root = nil;    private transient Node root;
134    
135    /**    /**
136     * The size of this TreeMap. Package visible for use by nested classes.     * The size of this TreeMap. Package visible for use by nested classes.
# Line 213  public class TreeMap<K, V> extends Abstr Line 213  public class TreeMap<K, V> extends Abstr
213    public TreeMap(Comparator<? super K> c)    public TreeMap(Comparator<? super K> c)
214    {    {
215      comparator = c;      comparator = c;
216        fabricateTree(0);
217    }    }
218    
219    /**    /**
# Line 851  public class TreeMap<K, V> extends Abstr Line 852  public class TreeMap<K, V> extends Abstr
852    private void fabricateTree(final int count)    private void fabricateTree(final int count)
853    {    {
854      if (count == 0)      if (count == 0)
855        return;        {
856            root = nil;
857            size = 0;
858            return;
859          }
860    
861      // We color every row of nodes black, except for the overflow nodes.      // We color every row of nodes black, except for the overflow nodes.
862      // I believe that this is the optimal arrangement. We construct the tree      // I believe that this is the optimal arrangement. We construct the tree

Legend:
Removed from v.1.23.2.2  
changed lines
  Added in v.1.23.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26