2020-08-30


今晚上出去散步
看到好多菜贩在街边卖零零散散的菜
要不是锅还没到 想着先买一些
想着电脑刚买的时候
送到我手里的那位姐说真重啊
但是我想 重的可能是它要完成的使命

/**
 * Represents a generic pair of two values.
 *
 * There is no meaning attached to values in this class, it can be used for any purpose.
 * Pair exhibits value semantics, i.e. two pairs are equal if both components are equal.
 * 这个类中的值没有附加任何意义,它可以用于任何目的。
 * Pair表示值语义,即如果两个分量相等,则两个Pair相等。
 *
 * An example of decomposing it into values:
 * @sample samples.misc.Tuples.pairDestructuring
 *
 * @param A type of the first value.
 * @param B type of the second value.
 * @property first First value.
 * @property second Second value.
 * @constructor Creates a new instance of Pair.
 */
public data class Pair<out A, out B>(
    public val first: A,
    public val second: B
) : Serializable {

    /**
     * Returns string representation of the [Pair] including its [first] and [second] values.
     */
    public override fun toString(): String = "($first, $second)"
}

Pair的封装体来自于kotlin Kotlin是为了均衡java与scala的使用于idea开发公司进行开发
idea不能完全将java代码转为kotlin

在项目中可以同时使用java和kotlin语言进行混合开发

原文地址:https://www.cnblogs.com/ukzq/p/13586552.html