Java Stream of toStream(T[] array, boolean parallel)

Here you can find the source of toStream(T[] array, boolean parallel)

Description

to Stream

License

Open Source License

Declaration

public static <T> Stream<T> toStream(T[] array, boolean parallel) 

Method Source Code


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

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

public class Main {
    public static <T> Stream<T> toStream(T[] array, boolean parallel) {
        return StreamSupport.stream(Arrays.spliterator(array), parallel);
    }//from  w  w  w .  j  av  a  2  s.c o m
}

Related

  1. toStream(final Iterable iterable)
  2. toStream(final T source)
  3. toStream(Iterable iterable)
  4. toStream(Iterator iter, boolean parallel)
  5. toStream(Optional value)
  6. toStreamLine(final Scanner scanner)
  7. toStreamNumber(final Scanner scanner)