Package org.apache.spark.util
Class Iterators
Object
org.apache.spark.util.Iterators
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
size
(scala.collection.Iterator<?> iterator) Counts the number of elements of an iterator using a while loop rather than callingTraversableOnce.size()
because it uses a for loop, which is slightly slower in the current version of Scala.
-
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 callingTraversableOnce.size()
because it uses a for loop, which is slightly slower in the current version of Scala.- Parameters:
iterator
- (undocumented)- Returns:
- (undocumented)
-