Stay organized with collections
Save and categorize content based on your preferences.
EntityIterator
interface EntityIterator : MutableIterator<Entity!>
A specialization of Iterator
that allows iterating over a collection of Entity
objects. In addition to the iteration functionality it also allows resetting the iterator back to the beginning and provides for an explicit close()
method to indicate that the iterator is no longer needed and that its resources can be released.
Summary
Public methods |
abstract Unit |
Indicates that this iterator is no longer needed and that any associated resources may be released (such as a SQLite cursor).
|
abstract Unit |
Reset the iterator back to the beginning.
|
Public methods
close
abstract fun close(): Unit
Indicates that this iterator is no longer needed and that any associated resources may be released (such as a SQLite cursor).
reset
abstract fun reset(): Unit
Reset the iterator back to the beginning.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# EntityIterator\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEntityIterator\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/EntityIterator \"View this page in Java\") \n\n```\ninterface EntityIterator : MutableIterator\u003cEntity!\u003e\n```\n\n|-------------------------------------|\n| [android.content.EntityIterator](#) |\n\nA specialization of [Iterator](../../java/util/Iterator.html#) that allows iterating over a collection of [Entity](/reference/kotlin/android/content/Entity) objects. In addition to the iteration functionality it also allows resetting the iterator back to the beginning and provides for an explicit [close()](#close()) method to indicate that the iterator is no longer needed and that its resources can be released.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [close](#close())`()` Indicates that this iterator is no longer needed and that any associated resources may be released (such as a SQLite cursor). |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [reset](#reset())`()` Reset the iterator back to the beginning. |\n\nPublic methods\n--------------\n\n### close\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun close(): Unit\n```\n\nIndicates that this iterator is no longer needed and that any associated resources may be released (such as a SQLite cursor). \n\n### reset\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun reset(): Unit\n```\n\nReset the iterator back to the beginning."]]