c

Custom.Tuple._library4

final class _library4[A, B, C, D] extends AnyVal

Tuple4 Library

Ordering
  1. Alphabetic
Inherited
  1. Tuple._library4
  2. scala.AnyVal
  3. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. def apply(f: (A, B, C, D) ⇒ Any): (A, B, C, D)

    Process by function

    Process by function

    Processes tuple elements in functional manner

    Returns original tuple

    (2, 4, 6, 8) apply (_ + _ + _ + _ lp)                                              // Prints: 20
    
    (4, 4, 6, 8)((first, second, third, fourth) => first + second + third + fourth lp) // Prints: 22
    Definition Classes
    _library4
  2. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  3. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  4. def map1[T](f: (A) ⇒ T): (T, B, C, D)

    Map first

    Map first

    Creates new tuple with first element mapped

    (1, 2, 3, 4).map1(_ * 10) lp   // Prints: (10,2,3,4)
    Definition Classes
    _library4
  5. def map2[T](f: (B) ⇒ T): (A, T, C, D)

    Map second

    Map second

    Creates new tuple with second element mapped

    (1, 2, 3, 4).map2(_ * 10) lp   // Prints: (1,20,3,4)
    Definition Classes
    _library4
  6. def map3[T](f: (C) ⇒ T): (A, B, T, D)

    Map third

    Map third

    Creates new tuple with third element mapped

    (1, 2, 3, 4).map3(_ * 10).lp   // Prints: (1,2,30,4)
    Definition Classes
    _library4
  7. def map4[T](f: (D) ⇒ T): (A, B, C, T)

    Map fourth

    Map fourth

    Creates new tuple with fourth element mapped

    (1, 2, 3, 4).map4(_ * 10) lp   // Prints: (1,2,3,40)
    Definition Classes
    _library4
  8. def to[T](f: (A, B, C, D) ⇒ T): T

    Convert by function

    Convert by function

    Converts tuple elements in functional manner

    (2, 4, 6, 8).to(_ + _ + _ + _) lp                                                  // Prints: 20
    
    (4, 4, 6).to((first, second, third, fourth) => first + second + third + fourth) lp // Prints: 22
    Definition Classes
    _library4
  9. def toString(): String
    Definition Classes
    Any

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
Linear Supertypes
AnyVal, Any
Source: _library4.scala