com.spotify.scio.extra
Utilities for Scala collection library.
Adds a top method to Array[T] and Iterable[T] and a topByKey method to Array[(K, V)] and Iterable[(K, V)].
top
Array[T]
Iterable[T]
topByKey
Array[(K, V)]
Iterable[(K, V)]
import com.spotify.scio.extra.Collections._ val xs: Array[(String, Int)] = // ... xs.top(5)(Ordering.by(_._2)) xs.topByKey(5)
Enhance Array by adding a top method.
Enhance Array by adding a topByKey method.
Enhance Iterable by adding a topByKey method.
Enhance Iterable by adding a top method.
Utilities for Scala collection library.
Adds a
top
method toArray[T]
andIterable[T]
and atopByKey
method toArray[(K, V)]
andIterable[(K, V)]
.