object SeqOps
Implicits for converting Seqs.
import com.twitter.conversions.SeqOps._ Seq("a", "and").createMap(_.size, _) Seq("a", "and").groupBySingleValue(_.size) Seq("a", "and").findItemAfter("a") var numStrings = 0 Seq(1, 2) foreachPartial { case e: Int => numStrings += 1 }
- Alphabetic
- By Inheritance
- SeqOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createMap[A, K, V](sequence: Seq[A], values: (A) => V): Map[A, V]
Creates a map from the given sequence by mapping each element of the sequence (the key) to the transformed element (the value) by applying the function
values
.Creates a map from the given sequence by mapping each element of the sequence (the key) to the transformed element (the value) by applying the function
values
.- sequence
the seq to convert to a map
- values
the function that transforms a given element in the seq to a value
- returns
a map of the given sequence
- def createMap[A, K, V](sequence: Seq[A], keys: (A) => K, values: (A) => V): Map[K, V]
Creates a map from the given sequence by applying the functions
keys
andvalues
to the sequence.Creates a map from the given sequence by applying the functions
keys
andvalues
to the sequence.- sequence
the seq to convert to a map
- keys
the function that transforms a given element in the seq to a key
- values
the function that transforms a given element in the seq to a value
- returns
a map of the given sequence
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def findItemAfter[A](sequence: Seq[A], itemToFind: A): Option[A]
Finds the element after the given element to find.
Finds the element after the given element to find.
- sequence
the seq to scan for the element
- itemToFind
the element before the one returned
- returns
an Option of the element after the item to find
- def foreachPartial[A](sequence: Seq[A], pf: PartialFunction[A, Unit]): Unit
Applies the given partial function to the sequence.
Applies the given partial function to the sequence.
- sequence
the seq onto which the partial function is applied
- pf
the partial function to apply to the seq
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()