java.lang.Object
com.intellij.openapi.util.Pair<A,B>
- Direct Known Subclasses:
Pair.NonNull
Generic wrapper around two related values.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Comparable<? super A>,B>
Comparator<Pair<A,B>> static <A,B extends Comparable<? super B>>
Comparator<Pair<A,B>> static <A,B> @NotNull Pair<A, B> create(A first, B second) static <A,B> @NotNull Pair.NonNull<A, B> createNonNull(A first, B second) static <A,B> @NotNull Pair<A, B> empty()final booleanfinal AgetFirst()static <T> Tfinal Bstatic <T> TinthashCode()static <A,B> @NotNull Pair<A, B> pair(A first, B second) toString()
-
Field Details
-
first
-
second
-
-
Constructor Details
-
Pair
- See Also:
-
-
Method Details
-
create
-
createNonNull
@NotNull public static <A,B> @NotNull Pair.NonNull<A,B> createNonNull(@NotNull A first, @NotNull B second) -
pair
-
getFirst
-
getSecond
-
empty
-
getFirst
-
getSecond
-
equals
-
hashCode
public int hashCode() -
toString
-
comparingByFirst
- Type Parameters:
A- first value type (Comparable)B- second value type- Returns:
- a comparator that compares pair values by first value
-
comparingBySecond
- Type Parameters:
A- first value typeB- second value type (Comparable)- Returns:
- a comparator that compares pair values by second value
-