LabelIterator

Contains the methods for iterating through a list of labels. For information about iterators, see Iterators.

Example usage:

    // Gets the iterator that iterates all labels
    // in the account.
    var iterator = AdsApp.labels().get();

    // Loops through all labels in the account.
    while (iterator.hasNext()) {
        var label = iterator.next();
    }

Methods

Method Name Return Type Description
hasNext Boolean Gets a Boolean value that indicates whether this iterator has more elements.
next Label Advances the iterator and returns the next label.
totalNumEntities int Gets the number of labels that matched the selector's selection criteria.

hasNext

Gets a Boolean value that indicates whether this iterator has more elements.

Returns

Type Description
Boolean Is true if this iterator has more elements; otherwise, false.

next

Advances the iterator and returns the next label.

Returns

Type Description
Label The next label in the iterator.

totalNumEntities

Gets the number of labels that matched the selector's selection criteria.

Returns

Type Description
int The number of labels that matched the selector's selection criteria.

See also