Packages

object SeqOps

Implicits for converting Seqs.

Example:
  1. 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
    }
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SeqOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit final class RichSeq[A] extends AnyVal

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. 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

  7. 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 and values to the sequence.

    Creates a map from the given sequence by applying the functions keys and values 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

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. 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

  12. 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

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped