Add stable tags to ol.Collection
This commit is contained in:
@@ -19,13 +19,13 @@ ol.CollectionEventType = {
|
||||
/**
|
||||
* Triggered when an item is added to the collection.
|
||||
* @event ol.CollectionEvent#add
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ADD: 'add',
|
||||
/**
|
||||
* Triggered when an item is removed from the collection.
|
||||
* @event ol.CollectionEvent#remove
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
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.
|
||||
* @type {*}
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
this.element = opt_element;
|
||||
|
||||
@@ -75,7 +75,7 @@ ol.CollectionProperty = {
|
||||
* @extends {ol.Object}
|
||||
* @fires ol.CollectionEvent
|
||||
* @param {Array=} opt_array Array.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection = function(opt_array) {
|
||||
|
||||
@@ -95,7 +95,7 @@ goog.inherits(ol.Collection, ol.Object);
|
||||
|
||||
/**
|
||||
* Remove all elements from the collection.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.clear = function() {
|
||||
while (this.getLength() > 0) {
|
||||
@@ -107,7 +107,7 @@ ol.Collection.prototype.clear = function() {
|
||||
/**
|
||||
* @param {Array} arr Array.
|
||||
* @return {ol.Collection} This collection.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.extend = function(arr) {
|
||||
var i, ii;
|
||||
@@ -125,7 +125,7 @@ ol.Collection.prototype.extend = function(arr) {
|
||||
* index and the array). The return value is ignored.
|
||||
* @param {S=} opt_this The object to use as `this` in `f`.
|
||||
* @template T,S
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.forEach = function(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
|
||||
* of the array.
|
||||
* @return {Array} Array.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.getArray = function() {
|
||||
return this.array_;
|
||||
@@ -160,7 +160,7 @@ ol.Collection.prototype.item = function(index) {
|
||||
* Get the length of this collection.
|
||||
* @return {number} The length of the array.
|
||||
* @todo observable
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.getLength = function() {
|
||||
return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH));
|
||||
@@ -171,7 +171,7 @@ ol.Collection.prototype.getLength = function() {
|
||||
* Insert an element at the provided index.
|
||||
* @param {number} index Index.
|
||||
* @param {*} elem Element.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.insertAt = function(index, elem) {
|
||||
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.
|
||||
* @return {*} Element.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.pop = function() {
|
||||
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.
|
||||
* @param {*} elem Element.
|
||||
* @return {number} Length.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.push = function(elem) {
|
||||
var n = this.array_.length;
|
||||
@@ -208,7 +208,7 @@ ol.Collection.prototype.push = function(elem) {
|
||||
* Removes the first occurence of elem from the collection.
|
||||
* @param {*} elem Element.
|
||||
* @return {*} The removed element or undefined if elem was not found.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.remove = function(elem) {
|
||||
var arr = this.array_;
|
||||
@@ -226,7 +226,7 @@ ol.Collection.prototype.remove = function(elem) {
|
||||
* Remove the element at the provided index.
|
||||
* @param {number} index Index.
|
||||
* @return {*} Value.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.removeAt = function(index) {
|
||||
var prev = this.array_[index];
|
||||
@@ -242,7 +242,7 @@ ol.Collection.prototype.removeAt = function(index) {
|
||||
* Set the element at the provided index.
|
||||
* @param {number} index Index.
|
||||
* @param {*} elem Element.
|
||||
* @todo api
|
||||
* @todo api stable
|
||||
*/
|
||||
ol.Collection.prototype.setAt = function(index, elem) {
|
||||
var n = this.getLength();
|
||||
|
||||
Reference in New Issue
Block a user