Add stable tags to ol.Collection

This commit is contained in:
Éric Lemoine
2014-06-19 10:35:04 +02:00
parent 5e9121cd8b
commit 601f0d8fd2
+15 -15
View File
@@ -19,13 +19,13 @@ ol.CollectionEventType = {
/** /**
* Triggered when an item is added to the collection. * Triggered when an item is added to the collection.
* @event ol.CollectionEvent#add * @event ol.CollectionEvent#add
* @todo api * @todo api stable
*/ */
ADD: 'add', ADD: 'add',
/** /**
* Triggered when an item is removed from the collection. * Triggered when an item is removed from the collection.
* @event ol.CollectionEvent#remove * @event ol.CollectionEvent#remove
* @todo api * @todo api stable
*/ */
REMOVE: 'remove' REMOVE: 'remove'
}; };
@@ -47,7 +47,7 @@ ol.CollectionEvent = function(type, opt_element, opt_target) {
/** /**
* The element that is added to or removed from the collection. * The element that is added to or removed from the collection.
* @type {*} * @type {*}
* @todo api * @todo api stable
*/ */
this.element = opt_element; this.element = opt_element;
@@ -75,7 +75,7 @@ ol.CollectionProperty = {
* @extends {ol.Object} * @extends {ol.Object}
* @fires ol.CollectionEvent * @fires ol.CollectionEvent
* @param {Array=} opt_array Array. * @param {Array=} opt_array Array.
* @todo api * @todo api stable
*/ */
ol.Collection = function(opt_array) { ol.Collection = function(opt_array) {
@@ -95,7 +95,7 @@ goog.inherits(ol.Collection, ol.Object);
/** /**
* Remove all elements from the collection. * Remove all elements from the collection.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.clear = function() { ol.Collection.prototype.clear = function() {
while (this.getLength() > 0) { while (this.getLength() > 0) {
@@ -107,7 +107,7 @@ ol.Collection.prototype.clear = function() {
/** /**
* @param {Array} arr Array. * @param {Array} arr Array.
* @return {ol.Collection} This collection. * @return {ol.Collection} This collection.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.extend = function(arr) { ol.Collection.prototype.extend = function(arr) {
var i, ii; var i, ii;
@@ -125,7 +125,7 @@ ol.Collection.prototype.extend = function(arr) {
* index and the array). The return value is ignored. * index and the array). The return value is ignored.
* @param {S=} opt_this The object to use as `this` in `f`. * @param {S=} opt_this The object to use as `this` in `f`.
* @template T,S * @template T,S
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.forEach = function(f, opt_this) { ol.Collection.prototype.forEach = function(f, opt_this) {
goog.array.forEach(this.array_, f, opt_this); goog.array.forEach(this.array_, f, opt_this);
@@ -138,7 +138,7 @@ ol.Collection.prototype.forEach = function(f, opt_this) {
* collection's "length" property won't be in sync with the actual length * collection's "length" property won't be in sync with the actual length
* of the array. * of the array.
* @return {Array} Array. * @return {Array} Array.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.getArray = function() { ol.Collection.prototype.getArray = function() {
return this.array_; return this.array_;
@@ -160,7 +160,7 @@ ol.Collection.prototype.item = function(index) {
* Get the length of this collection. * Get the length of this collection.
* @return {number} The length of the array. * @return {number} The length of the array.
* @todo observable * @todo observable
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.getLength = function() { ol.Collection.prototype.getLength = function() {
return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH)); return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH));
@@ -171,7 +171,7 @@ ol.Collection.prototype.getLength = function() {
* Insert an element at the provided index. * Insert an element at the provided index.
* @param {number} index Index. * @param {number} index Index.
* @param {*} elem Element. * @param {*} elem Element.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.insertAt = function(index, elem) { ol.Collection.prototype.insertAt = function(index, elem) {
goog.array.insertAt(this.array_, elem, index); goog.array.insertAt(this.array_, elem, index);
@@ -184,7 +184,7 @@ ol.Collection.prototype.insertAt = function(index, elem) {
/** /**
* Remove the last element of the collection. * Remove the last element of the collection.
* @return {*} Element. * @return {*} Element.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.pop = function() { ol.Collection.prototype.pop = function() {
return this.removeAt(this.getLength() - 1); return this.removeAt(this.getLength() - 1);
@@ -195,7 +195,7 @@ ol.Collection.prototype.pop = function() {
* Insert the provided element at the end of the collection. * Insert the provided element at the end of the collection.
* @param {*} elem Element. * @param {*} elem Element.
* @return {number} Length. * @return {number} Length.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.push = function(elem) { ol.Collection.prototype.push = function(elem) {
var n = this.array_.length; var n = this.array_.length;
@@ -208,7 +208,7 @@ ol.Collection.prototype.push = function(elem) {
* Removes the first occurence of elem from the collection. * Removes the first occurence of elem from the collection.
* @param {*} elem Element. * @param {*} elem Element.
* @return {*} The removed element or undefined if elem was not found. * @return {*} The removed element or undefined if elem was not found.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.remove = function(elem) { ol.Collection.prototype.remove = function(elem) {
var arr = this.array_; var arr = this.array_;
@@ -226,7 +226,7 @@ ol.Collection.prototype.remove = function(elem) {
* Remove the element at the provided index. * Remove the element at the provided index.
* @param {number} index Index. * @param {number} index Index.
* @return {*} Value. * @return {*} Value.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.removeAt = function(index) { ol.Collection.prototype.removeAt = function(index) {
var prev = this.array_[index]; var prev = this.array_[index];
@@ -242,7 +242,7 @@ ol.Collection.prototype.removeAt = function(index) {
* Set the element at the provided index. * Set the element at the provided index.
* @param {number} index Index. * @param {number} index Index.
* @param {*} elem Element. * @param {*} elem Element.
* @todo api * @todo api stable
*/ */
ol.Collection.prototype.setAt = function(index, elem) { ol.Collection.prototype.setAt = function(index, elem) {
var n = this.getLength(); var n = this.getLength();