All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rutledgepaulv.rqe.utils.StreamUtil Maven / Gradle / Ivy

The newest version!
/*
 *  com.github.rutledgepaulv.rqe.utils.StreamUtil
 *  *
 *  * Copyright (C) 2016 Paul Rutledge 
 *  *
 *  * This software may be modified and distributed under the terms
 *  * of the MIT license.  See the LICENSE file for details.
 *
 */

package com.github.rutledgepaulv.rqe.utils;

import java.util.Iterator;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

public class StreamUtil {

    public static  Stream fromIterator(Iterator iter) {
        Iterable iterable = () -> iter;
        return StreamSupport.stream(iterable.spliterator(), false);
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy