final class TraversalSugarExt[A] extends AnyVal
- Alphabetic
- By Inheritance
- TraversalSugarExt
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TraversalSugarExt(iter: Iterator[A])
Type Members
- type Traversal[A] = Iterator[A]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cast[B]: Traversal[B]
casts all elements to given type note: this can lead to casting errors
casts all elements to given type note: this can lead to casting errors
- Annotations
- @Doc()
- See also
collectAll
as a safe alternative
- def collectAll[B](implicit ev: ClassTag[B]): Traversal[B]
collects all elements of the given class (beware of type-erasure)
collects all elements of the given class (beware of type-erasure)
- Annotations
- @Doc()
- def countTrav: Traversal[Int]
- def dedup: Traversal[A]
Deduplicate elements of this traversal - a.k.a.
Deduplicate elements of this traversal - a.k.a. distinct, unique, ...
- Annotations
- @Doc()
- def dedupBy(fun: (A) => Any): Traversal[A]
deduplicate elements of this traversal by a given function
deduplicate elements of this traversal by a given function
- Annotations
- @Doc()
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def groupBy[K](f: (A) => K): Map[K, List[A]]
- def groupCount[B](by: (A) => B): Map[B, Int]
group elements by a given transformation function and count how often the results appear
group elements by a given transformation function and count how often the results appear
- Annotations
- @Doc()
- def groupCount[B >: A]: Map[B, Int]
group elements and count how often they appear
group elements and count how often they appear
- Annotations
- @Doc()
- def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, List[B]]
- def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
- def head: A
- def headOption: Option[A]
- def help[B >: A](implicit elementType: ClassTag[B], searchPackages: DocSearchPackages, availableWidthProvider: AvailableWidthProvider): String
Print help/documentation based on the current elementType
A
.Print help/documentation based on the current elementType
A
. Relies on all step extensions being annotated with \@Traversal / @Doc Note that this works independently of tab completion and implicit conversions in scope - it will simply list all documented steps in the classpath- Annotations
- @Doc()
- def helpVerbose[B >: A](implicit elementType: ClassTag[B], searchPackages: DocSearchPackages, availableWidthProvider: AvailableWidthProvider): String
- Annotations
- @Doc()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val iter: Iterator[A]
- def iterate(): Unit
Execute the traversal without returning anything
Execute the traversal without returning anything
- Annotations
- @Doc()
- def l: List[A]
Execute the traversal and convert the result to a list - shorthand for
toList
Execute the traversal and convert the result to a list - shorthand for
toList
- Annotations
- @Doc()
- def last: A
- def lastOption: Option[A]
- def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): Seq[A]
sort elements by the value of the given transformation function
sort elements by the value of the given transformation function
- Annotations
- @Doc()
- def sorted[B >: A](implicit ord: Ordering[B]): Seq[B]
sort elements by their natural order
sort elements by their natural order
- Annotations
- @Doc()
- def toSetImmutable[B >: A]: Set[B]
Execute the traversal and convert the result to an immutable Set.
- def toSetMutable[B >: A]: LinkedHashSet[B]
Execute the traversal and return a mutable.Set (better performance than
immutableSet
and has stable iterator order) - def toString(): String
- Definition Classes
- Any