X-Git-Url: http://nitlanguage.org diff --git a/lib/ordered_tree.nit b/lib/ordered_tree.nit index 5c42f46..2a6a10c 100644 --- a/lib/ordered_tree.nit +++ b/lib/ordered_tree.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# management and display of ordered trees +# Manipulation and presentation of ordered trees. module ordered_tree # Generic structure to manage and display an ordered tree @@ -59,7 +59,7 @@ module ordered_tree # This class can be used as it to work with generic trees but can also be specialized to provide more specific # behavior or display. It is why the internal attributes are mutable. class OrderedTree[E: Object] - super Streamable + super Writable super Collection[E] # The roots of the tree (in sequence) @@ -85,7 +85,7 @@ class OrderedTree[E: Object] # print the full tree on `o` # Write a ASCII-style tree and use the `display` method to label elements - redef fun write_to(stream: OStream) + redef fun write_to(stream: Writer) do for r in roots do stream.write display(r) @@ -94,7 +94,7 @@ class OrderedTree[E: Object] end end - private fun sub_write_to(o: OStream, e: E, prefix: String) + private fun sub_write_to(o: Writer, e: E, prefix: String) do if not sub.has_key(e) then return var subs = sub[e]