lib/dummy_array: fixes documentation warnings
[nit.git] / lib / dummy_array.nit
index b568863..9061e53 100644 (file)
@@ -1,6 +1,7 @@
 # This file is part of NIT ( http://www.nitlanguage.org ).
 #
 # Copyright 2008 Floréal Morandat <morandat@lirmm.fr>
+# Copyright 2014 Alexandre Terrasa <alexandre@moz-code.org>
 #
 # This file is free software, which comes along with NIT.  This software is
 # distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
@@ -10,6 +11,7 @@
 # You  are  allowed  to  redistribute it and sell it, alone or is a part of
 # another product.
 
+# A `Set` that contains only integers.
 class DummyArray
        super Set[Int]
        private var capacity: Int
@@ -75,6 +77,7 @@ class DummyArray
                return _values[pos]
        end
 
+       # initialize a new DummyArray with `capacity`.
        init(capacity: Int) is old_style_init do
                _capacity = capacity
                _keys = new NativeArray[Int](capacity)
@@ -82,6 +85,7 @@ class DummyArray
        end
 end
 
+# An iterator over a `DummyArray`.
 class DummyIterator
        super Iterator[Int]
        private var array: DummyArray
@@ -100,6 +104,7 @@ class DummyIterator
 
        redef fun next do _pos = _pos + 1 end
 
+       # Initialize an iterator for `array`.
        init(array: DummyArray) is old_style_init do
                _pos = 0
                _array = array