Java Iterator singletonIterator(final T t)

Here you can find the source of singletonIterator(final T t)

Description

singleton Iterator

License

Open Source License

Declaration

public static <T> Iterator<T> singletonIterator(final T t) 

Method Source Code

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

import java.util.*;

public class Main {
    public static <T> Iterator<T> singletonIterator(final T t) {
        return Collections.singletonList(t).iterator();
    }//from  w  w  w  .j av  a  2  s  . c o  m
}

Related

  1. singleElementIterator(T element)
  2. singleOrDefault(Iterator iterator)
  3. singletonIterator(final Object item)
  4. singletonIterator(final T item)
  5. singletonIterator(final T nullableValue)
  6. size(Iterator iterator)
  7. splice(LinkedList list, Iterator iterator, LinkedList list2, V v)
  8. toArray(final Iterator iterator)
  9. toCollection(final Iterator iterator, final Collection c)