AdsApp.​SnippetIterator

An iterator of snippets.

Typical usage:

while(snippetIterator.hasNext()){varsnippet=snippetIterator.next();}
Related:

Methods:

MemberTypeDescription
hasNextbooleanReturnstrue if the iterator has more elements.
nextAdsApp.SnippetReturns the nextSnippet in the iterator.
totalNumEntitiesintReturns the total number of entities matched by the selector whichgenerated this iterator.

hasNext()

Returnstrue if the iterator has more elements.

Return values:

TypeDescription
booleantrue if the iterator has more elements.

next()

Returns the nextSnippet in the iterator.

Return values:

TypeDescription
AdsApp.SnippetThe nextSnippet in theiterator.

totalNumEntities()

Returns the total number of entities matched by the selector whichgenerated this iterator.

Note that the returned number disregards limits, and that the iteratoris not guaranteed to have this many elements —hasNext willstart to returnfalse andnext will start tothrow exceptions as soon as the limit for entity reads has been reached,even if the selector matched more entities.

Return values:

TypeDescription
intThe number of entities matched by the selector which generated this iterator.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-11 UTC.