微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

有状态迭代器Java

什么是有状态迭代器?

此问题与Hadoop中定义的用于执行连接的迭代器有关.正如参考documentation所述:

This defines an interface to a stateful Iterator that can replay
elements added to it directly. Note that this does not extend
Iterator.

‘重播元素直接添加到它’是什么意思?这个迭代器与通常的迭代器有什么不同?

解决方法

以下是有状态迭代器的更多信息:

http://en.wikipedia.org/wiki/Iterator(查看发生器)

以及一些进一步的信息:

http://www.itmaybeahack.com/book/python-2.6/html/p02/p02c08_generators.html

最后到这里:

http://www.devdaily.com/java/jwarehouse/trove-1.1b3/src/gnu/trove/TIntIntIterator.java.shtml

As the iteration is stateful,access to the key/value parts of the
current map entry happens in constant time.

希望这可以帮助.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐