Skip to content

Commit 652c3e9

Browse files
author
Bishop92
committed
Improved the documentation.
1 parent d46b3ef commit 652c3e9

4 files changed

Lines changed: 5466 additions & 8 deletions

File tree

Aggregate/Aggregate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function Aggregate() {
77
}
88

99
/**
10-
* Return the iterator relative to the aggregate.
10+
* Returns the iterator relative to the aggregate.
1111
* @abstract
1212
* @return {Iterator} The iterator.
1313
*/

Aggregate/Iterator.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
* Created by Stefano on 04/04/2014.
33
*/
44

5+
/**
6+
* Interface for managing an iterator for an aggregate.
7+
* @constructor
8+
* @interface
9+
*/
510
function Iterator() {
611

712
}
813

914
/**
10-
* Move the iterator to the first position of the aggregate.
15+
* Moves the iterator to the first position of the aggregate.
1116
* @abstract
1217
* @return {void}
1318
*/
@@ -16,7 +21,7 @@ Iterator.prototype.first = function () {
1621
};
1722

1823
/**
19-
* Move the iterator to the next item.
24+
* Moves the iterator to the next item.
2025
* @abstract
2126
* @return {void}
2227
*/
@@ -25,7 +30,7 @@ Iterator.prototype.next = function () {
2530
};
2631

2732
/**
28-
* Move the iterator to the last position of the aggregate.
33+
* Moves the iterator to the last position of the aggregate.
2934
* @abstract
3035
* @return {void}
3136
*/
@@ -34,7 +39,7 @@ Iterator.prototype.last = function () {
3439
};
3540

3641
/**
37-
* Move the iterator to the previous item.
42+
* Moves the iterator to the previous item.
3843
* @abstract
3944
* @return {void}
4045
*/
@@ -43,7 +48,7 @@ Iterator.prototype.previous = function () {
4348
};
4449

4550
/**
46-
* Check if the iterator is out of the bounds of the aggregate.
51+
* Checks if the iterator is out of the bounds of the aggregate.
4752
* @abstract
4853
* @return {boolean} It return true if the iterator is out of the bounds of the aggregate, otherwise false.
4954
*/
@@ -52,9 +57,9 @@ Iterator.prototype.isDone = function () {
5257
};
5358

5459
/**
55-
* Return the item stored at the position pointed by the iterator.
60+
* Returns the item stored at the position pointed by the iterator.
5661
* @abstract
57-
* @return {Object|undefined} The item stored or undefined if it's out of the bounds.
62+
* @return {*} The item stored or undefined if it's out of the bounds.
5863
*/
5964
Iterator.prototype.getItem = function () {
6065

BSTree/BSTree.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ function BSNode(key, item) {
3939
BSTree.prototype = new Aggregate();
4040
BSTree.prototype.constructor = BSTree;
4141

42+
/**
43+
* Class for managing a binary search tree.
44+
* @constructor
45+
*/
4246
function BSTree() {
4347
/**
4448
* The root of the tree.

0 commit comments

Comments
 (0)