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. |
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 |
/** |
/** |
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 |