projects: update some short descriptions
[nit.git] / lib / trees / abstract_tree.nit
index 63ac67a..6626036 100644 (file)
@@ -28,7 +28,7 @@ abstract class TreeMap[K: Comparable, E]
        protected type N: TreeNode[K, E]
 
        # The `root` node of the tree (null if tree is empty)
-       protected var root: nullable N protected writable = null
+       protected var root: nullable N = null is protected writable
 
        # Display the tree in a gaphical windows
        # Graphviz with a working -Txlib is expected
@@ -42,7 +42,7 @@ end
 class TreeNode[K: Comparable, E]
 
        # TreeNode type
-       type SELF: TreeNode[K, E]
+       type N: TreeNode[K, E]
 
        # `key` for this node
        var key: K
@@ -51,9 +51,9 @@ class TreeNode[K: Comparable, E]
        var value: E
 
        # Direct parent of this node (null if the node is root)
-       var parent: nullable SELF writable = null
+       var parent: nullable N = null is writable
 
-       redef fun to_s do return "\{{value}\}"
+       redef fun to_s do return "\{{value or else ""}\}"
 
        # Return dot representation of this node
        # Used for debugging by `AbstractTree::show_dot`