com.android.util
Class Pair<S,T>

java.lang.Object
  extended by com.android.util.Pair<S,T>
Type Parameters:
S - The type of the first value
T - The type of the second value

Deprecated. This is used for backward compatibility with layoutlib-api. Use com.android.utils.Pair instead

@Deprecated
public class Pair<S,T>
extends java.lang.Object

A Pair class is simply a 2-tuple for use in this package. We might want to think about adding something like this to a more central utility place, or replace it by a common tuple class if one exists, or even rewrite the layout classes using this Pair by a more dedicated data structure (so we don't have to pass around generic signatures as is currently done, though at least the construction is helped a bit by the of(S, T) factory method. ================================================================================================= WARNING This copy of the class is to be used only by layoutlib and is not to be changed, EVER. To use Pair outside of layoutlib, use com.android.utils.Pair, found in common.jar instead. =================================================================================================


Method Summary
 boolean equals(java.lang.Object obj)
          Deprecated.  
 S getFirst()
          Deprecated. Return the first item in the pair
 T getSecond()
          Deprecated. Return the second item in the pair
 int hashCode()
          Deprecated.  
static
<S,T> Pair<S,T>
of(S first, T second)
          Deprecated. Constructs a new pair of the given two objects, inferring generic types.
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getFirst

public S getFirst()
Deprecated. 
Return the first item in the pair

Returns:
the first item in the pair

getSecond

public T getSecond()
Deprecated. 
Return the second item in the pair

Returns:
the second item in the pair

of

public static <S,T> Pair<S,T> of(S first,
                                 T second)
Deprecated. 
Constructs a new pair of the given two objects, inferring generic types.

Type Parameters:
S - the type of the first item
T - the type of the second item
Parameters:
first - the first item to store in the pair
second - the second item to store in the pair
Returns:
a new pair wrapping the two items

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Deprecated. 
Overrides:
equals in class java.lang.Object