Mercurial > hg > Database > jungle-sharp
diff src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs @ 2:a3af05a061b4
fix , but not work.
author | Kazuma |
---|---|
date | Fri, 01 Jul 2016 19:28:57 +0900 |
parents | 5c58219da97e |
children | 224f0f8b4f40 |
line wrap: on
line diff
--- a/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs Fri Jul 01 11:41:41 2016 +0900 +++ b/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/data/treemap/TreeMapNode.cs Fri Jul 01 19:28:57 2016 +0900 @@ -7,8 +7,8 @@ public abstract class TreeMapNode<K,V> { - public K key = default(K); - public V value = default(V); + protected K key = default(K); + protected V value = default(V); public TreeMapNode<K,V> right; public TreeMapNode<K,V> left; @@ -42,8 +42,8 @@ public V get (K key, Comparer<K> ctr) { TreeMapNode<K,V> cur = this; - int result = cur.compare (key, ctr); - while (cur.isNotEmpty ()) { + while (cur.isNotEmpty ()) { // getでEmpty nodeを返している ? compareでKeyが0になっている + int result = cur.compare (key, ctr); if (result > 0) { cur = cur.rights (); } else if (result < 0) { @@ -54,7 +54,7 @@ } } } - return default(V); // Optional<V>.ofNullable (null); + return default(V); }