本文整理了Java中scala.collection.Iterable.iterator()
方法的一些代码示例,展示了Iterable.iterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Iterable.iterator()
方法的具体详情如下:
包路径:scala.collection.Iterable
类名称:Iterable
方法名:iterator
暂无
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a Stream that traverses a scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the streamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable
*
* @param coll The scala.collection.Iterable to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.Iterable<T> coll) {
return StreamSupport.stream(new StepsAnyIterator<T>(coll.iterator()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a Stream that traverses a scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the streamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable
*
* @param coll The scala.collection.Iterable to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.Iterable<T> coll) {
return StreamSupport.stream(new StepsAnyIterator<T>(coll.iterator()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a Stream that traverses a scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the streamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable
*
* @param coll The scala.collection.Iterable to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.Iterable<T> coll) {
return StreamSupport.stream(new StepsAnyIterator<T>(coll.iterator()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a IntStream that traverses a int-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the intStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.Iterable<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a LongStream that traverses a long-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the longStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.Iterable<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a LongStream that traverses a long-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the longStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.Iterable<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a DoubleStream that traverses a double-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the doubleStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.Iterable<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a IntStream that traverses a int-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the intStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.Iterable<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a LongStream that traverses a long-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the longStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.Iterable<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a DoubleStream that traverses a double-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the doubleStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.Iterable<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a IntStream that traverses a int-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the intStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.Iterable<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntIterator(iter), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a DoubleStream that traverses a double-valued scala.collection.Iterable.
* <p>
* Only sequential operations will be efficient.
* For efficient parallel operation, use the doubleStreamAccumulated method instead,
* but note that this creates a copy of the contents of the Iterable.
*
* @param coll The scala.collection.Iterable to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.Iterable<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}
内容来源于网络,如有侵权,请联系作者删除!