case class MutablePair[T1, T2](_1: T1, _2: T2) extends Product2[T1, T2] with Product with Serializable
A tuple of 2 elements. This can be used as an alternative to Scala's Tuple2 when we want to minimize object allocation.
- _1
Element 1 of this MutablePair
- _2
Element 2 of this MutablePair
- Annotations
- @DeveloperApi()
- Source
- MutablePair.scala
- Alphabetic
- By Inheritance
- MutablePair
- Serializable
- Serializable
- Product2
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
var
_1: T1
- Definition Classes
- MutablePair → Product2
-
var
_2: T2
- Definition Classes
- MutablePair → Product2
-
def
canEqual(that: Any): Boolean
- Definition Classes
- MutablePair → Equals
-
def
productArity: Int
- Definition Classes
- Product2 → Product
-
def
productElement(n: Int): Any
- Definition Classes
- Product2 → Product
- Annotations
- @throws( ... )
-
def
toString(): String
- Definition Classes
- MutablePair → AnyRef → Any
-
def
update(n1: T1, n2: T2): MutablePair[T1, T2]
Updates this pair with new values and returns itself