Tags » Iterator

How to refresh the Iterator from the Managed Bean in ADF Mobile applciation.

When we want to programmatically refresh the Iterator “addressBookResultIterator” the was added in the AMX Page Bindings section from the Managed bean, we need to use the below code – 47 more words

ADF Mobile

Iterator & Iterable [Java]

Iterator (Interface)



Java集合类 [1]



Finite sequence generators in Java 8

… and introducing default methods.

Last time we looked at generators, and more specifically those generating an infinite sequence. We saw that there were several ways to achieve this: 1,018 more words

Functional Programming

HashMap in collection

HashMap :

HashMap class uses a hashtable to implement Map interface.HashMap using put() to store key/value pair.

Example :

package com.pkjavacode.com;

import java.util.Iterator;
import java.util.Map;
import java.util.HashMap;

public class HashMapExample {

public static void main(String[] args) {
Map<Integer, String> map = new HashMap<Integer, String>();
map.put(1, "Pradeep");
map.put(2, "Bharat");
map.put(3, "Amit");
map.put(4, "Rahul");
Iterator itr = map.entrySet().iterator();
while (itr.hasNext()) {
Map.Entry<Integer, String> me = (Map.Entry<Integer, String>) itr
System.out.print("" + me.getKey());
System.out.println(" " + me.getValue());



… 7 more words

Generators with Java 8

Today we’ll look at creating generators. In simple terms, a generator is a function which returns the next value in a sequence. Unlike an iterator, it generates the next value when needed, rather than returning the next item of a pre-generated collection. 1,038 more words

Functional Programming

#1,118 - foreach Works with Iterator Returned by yield

You can use the yield keyword in a method to implement an iterator.  The method in which it is defined returns an IEnumerable or IEnumerator… 129 more words