Trait/Object

scala.scalajs.js

Tuple2

Related Docs: object Tuple2 | package js

Permalink

sealed trait Tuple2[+T1, +T2] extends Object

A tuple "view" of 2 elements of a JavaScript Array. Combines

0: T0;
1: T1;

to

js.Tuple2[T0,T1]

Supports implicit conversion to scala.Tuple2. To use it, cast your array into a Tuple2 using

val array = js.Array[Any](42, "foobar")
val tuple2 = array.asInstanceOf[js.Tuple2[Int, String]]

or convert a Scala tuple

val obj: js.Tuple2[Int, String] = (42, "foobar")
Annotations
@RawJSType() @native()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tuple2
  2. Object
  3. Any
  4. AnyRef
  5. Any
Implicitly
  1. by toScalaTuple2
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: scala.Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to any2stringadd[Tuple2[T1, T2]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Tuple2[T1, T2], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to ArrowAssoc[Tuple2[T1, T2]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: scala.Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. val _1: T1

    Permalink
    Annotations
    @JSName( name = "0" )
  7. val _2: T2

    Permalink
    Annotations
    @JSName( name = "1" )
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensuring(cond: (Tuple2[T1, T2]) ⇒ Boolean, msg: ⇒ scala.Any): Tuple2[T1, T2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to Ensuring[Tuple2[T1, T2]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (Tuple2[T1, T2]) ⇒ Boolean): Tuple2[T1, T2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to Ensuring[Tuple2[T1, T2]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ scala.Any): Tuple2[T1, T2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to Ensuring[Tuple2[T1, T2]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): Tuple2[T1, T2]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to Ensuring[Tuple2[T1, T2]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: scala.Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to StringFormat[Tuple2[T1, T2]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hasOwnProperty(v: String): Boolean

    Permalink

    Tests whether this object has the specified property as a direct property.

    Tests whether this object has the specified property as a direct property.

    Unlike js.Object.hasProperty, this method does not check down the object's prototype chain.

    MDN

    Definition Classes
    Object
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def isPrototypeOf(v: Object): Boolean

    Permalink

    Tests whether this object is in the prototype chain of another object.

    Tests whether this object is in the prototype chain of another object.

    Definition Classes
    Object
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def productArity: Int

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to (T1, T2) performed by method toScalaTuple2 in scala.scalajs.js.Tuple2.
    Definition Classes
    Product2 → Product
  27. def productElement(n: Int): scala.Any

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to (T1, T2) performed by method toScalaTuple2 in scala.scalajs.js.Tuple2.
    Definition Classes
    Product2 → Product
    Annotations
    @throws( ... )
  28. def propertyIsEnumerable(v: String): Boolean

    Permalink

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain.

    Tests whether the specified property in an object can be enumerated by a call to js.Object.properties, with the exception of properties inherited through the prototype chain. If the object does not have the specified property, this method returns false.

    MDN

    Definition Classes
    Object
  29. def swap: (T2, T1)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to (T1, T2) performed by method toScalaTuple2 in scala.scalajs.js.Tuple2.
    Definition Classes
    Tuple2
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def valueOf(): scala.Any

    Permalink
    Definition Classes
    Object
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def [B](y: B): (Tuple2[T1, T2], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to ArrowAssoc[Tuple2[T1, T2]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def toString(): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Tuple2[T1, T2] to (T1, T2) performed by method toScalaTuple2 in scala.scalajs.js.Tuple2.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (tuple2: (T1, T2)).toString()
    Definition Classes
    Tuple2 → AnyRef → Any

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion toScalaTuple2 from Tuple2[T1, T2] to (T1, T2)

Inherited by implicit conversion any2stringadd from Tuple2[T1, T2] to any2stringadd[Tuple2[T1, T2]]

Inherited by implicit conversion StringFormat from Tuple2[T1, T2] to StringFormat[Tuple2[T1, T2]]

Inherited by implicit conversion Ensuring from Tuple2[T1, T2] to Ensuring[Tuple2[T1, T2]]

Inherited by implicit conversion ArrowAssoc from Tuple2[T1, T2] to ArrowAssoc[Tuple2[T1, T2]]

Ungrouped