Package com.strobel.core
Class Pair<TFirst,TSecond>
- java.lang.Object
-
- com.strobel.core.Pair<TFirst,TSecond>
-
-
Field Summary
Fields Modifier and Type Field Description private int_cachedHashCodeprivate TFirst_firstprivate TSecond_secondprivate static intFirstNullHashprivate static intSecondNullHashprivate static intUninitializedHashCode
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Pair<TFirst,TSecond> o)static <TFirst,TSecond>
Pair<TFirst,TSecond>create(TFirst first, TSecond second)booleanequals(Pair<? extends TFirst,? extends TSecond> other)booleanequals(java.lang.Object obj)TFirstgetFirst()TSecondgetSecond()inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
UninitializedHashCode
private static final int UninitializedHashCode
- See Also:
- Constant Field Values
-
FirstNullHash
private static final int FirstNullHash
- See Also:
- Constant Field Values
-
SecondNullHash
private static final int SecondNullHash
- See Also:
- Constant Field Values
-
_first
private final TFirst _first
-
_second
private final TSecond _second
-
_cachedHashCode
private int _cachedHashCode
-
-
Method Detail
-
getFirst
public final TFirst getFirst()
-
getSecond
public final TSecond getSecond()
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Pair<TFirst,TSecond> o)
- Specified by:
compareToin interfacejava.lang.Comparable<TFirst>
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
create
public static <TFirst,TSecond> Pair<TFirst,TSecond> create(TFirst first, TSecond second)
-
-