Pair

public class Pair
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.Pair<A, B>


Define our own Pair class which contains two objects.

Summary

Fields

public final A first

public final B second

Public constructors

Pair(A first, B second)

Public methods

static <A, B> Pair<A, B> create(A a, B b)

Convenience method to create a new pair.

boolean equals(Object o)

Checks whether two objects are equal

int hashCode()

Return a hashcode using hash codes from the inner objects

Fields

first

A first

second

B second

Public constructors

Pair

Pair (A first, 
                B second)

Parameters
first A
second B

Public methods

create

Pair<A, B> create (A a, 
                B b)

Convenience method to create a new pair.

Parameters
a A: the first object in the Pair
b B: the second object in the Pair
Returns
Pair<A, B> a Pair contains a and b

equals

boolean equals (Object o)

Checks whether two objects are equal

Parameters
o Object
Returns
boolean

hashCode

int hashCode ()

Return a hashcode using hash codes from the inner objects

Returns
int