Class Iterators

Object
org.apache.spark.util.Iterators

public class Iterators extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    size(scala.collection.Iterator<?> iterator)
    Counts the number of elements of an iterator using a while loop rather than calling TraversableOnce.size() because it uses a for loop, which is slightly slower in the current version of Scala.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Iterators

      public Iterators()
  • Method Details

    • size

      public static long size(scala.collection.Iterator<?> iterator)
      Counts the number of elements of an iterator using a while loop rather than calling TraversableOnce.size() because it uses a for loop, which is slightly slower in the current version of Scala.
      Parameters:
      iterator - (undocumented)
      Returns:
      (undocumented)