Java Iterator from createIterable(final Iterator src)

Here you can find the source of createIterable(final Iterator src)

Description

create Iterable

License

Open Source License

Declaration

public static <X> Iterable<X> createIterable(final Iterator<X> src) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;

public class Main {
    public static <X> Iterable<X> createIterable(final Iterator<X> src) {
        return new Iterable<X>() {
            public Iterator<X> iterator() {
                return src;
            }/*from  ww w  . jav a2  s . c  om*/
        };
    }
}

Related

  1. createIntegerIterator(int start)
  2. get(Iterator iterator, int position)
  3. getAll(Iterator it)
  4. getAt(Iterator it, int pos)
  5. getCommaSeparatedValue(Iterator it)