Java Iterator from getAt(Iterator it, int pos)

Here you can find the source of getAt(Iterator it, int pos)

Description

get At

License

Apache License

Declaration

public static <T> T getAt(Iterator<T> it, int pos) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Iterator;

public class Main {
    public static <T> T getAt(Iterator<T> it, int pos) {
        T val = null;

        for (int i = 0; i <= pos; i++)
            val = it.next();

        return val;
    }//from w w  w  .j ava 2s.co m
}

Related

  1. createIntegerIterator(int start)
  2. createIterable(final Iterator src)
  3. get(Iterator iterator, int position)
  4. getAll(Iterator it)
  5. getCommaSeparatedValue(Iterator it)
  6. getDestinationType(ImageReadParam param, Iterator imageTypes)
  7. getEmptyIterator()
  8. getEnumeratedObjectCount(Iterator objects)