@Deprecated
public class WeakIdentityPair<T1,T2>
extends java.lang.Object
Differs from Pair in the following ways: is immutable, cannot hold null, holds its elements with weak pointers, and its equals() method uses object equality to compare its elements.
Constructor and Description |
---|
WeakIdentityPair(T1 a,
T2 b)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Deprecated.
|
T1 |
getA()
Deprecated.
Return the first element of the pair, or null if it has been garbage-collected.
|
T2 |
getB()
Deprecated.
Return the second element of the pair, or null if it has been garbage-collected.
|
int |
hashCode()
Deprecated.
|
static <A,B> WeakIdentityPair<A,B> |
of(A a,
B b)
Deprecated.
Factory method with short name and no need to name type parameters.
|
java.lang.String |
toString()
Deprecated.
|
public static <A,B> WeakIdentityPair<A,B> of(A a, B b)
A
- type of first argumentB
- type of second argumenta
- first argumentb
- second argumentpublic T1 getA()
public T2 getB()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object