一对
public class Pair
extends Object
java.lang.Object |
↳ | com.android.tradefed.util.Pair <A,B> |
定义我们自己的Pair类,其中包含两个对象。
概括
公共建设者 |
---|
Pair (A first, B second) |
公开方法 |
---|
static <A, B> Pair <A, B> | create (A a, B b) 方便的方法来创建新的一对。 |
boolean | equals (Object o) 检查两个对象是否相等 |
int | hashCode () 使用内部对象中的哈希码返回哈希码 |
领域
公共建设者
一对
public Pair (A first,
B second)
公开方法
创造
public static Pair<A, B> create (A a,
B b)
方便的方法来创建新的一对。
参数 |
---|
a | A :配对中的第一个对象 |
b | B :配对中的第二个对象 |
等于
public boolean equals (Object o)
检查两个对象是否相等
hashCode
public int hashCode ()
使用内部对象中的哈希码返回哈希码
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2019-10-02 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]