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

com.github.pukkaone.odata.elasticsearch2.provider.Streams Maven / Gradle / Ivy

The newest version!
package com.github.pukkaone.odata.elasticsearch2.provider;

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

/**
 * Stream convenience methods.
 */
public final class Streams {

  // Private constructor disallows creating instances of this class.
  private Streams() {
  }

  /**
   * Creates {@link Stream} of elements from {@link Iterable}.
   *
   * @param 
   *     element type
   * @param iterable
   *     source of elements
   * @return stream
   */
  public static  Stream stream(Iterable iterable) {
    return StreamSupport.stream(iterable.spliterator(), false);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy