S - Type of the first thing.T - Type of the second thing.public final class Pair<S,T> extends Object
| 构造器和说明 |
|---|
Pair() |
| 限定符和类型 | 方法和说明 |
|---|---|
S |
getFirst()
Returns the first element of the Pair.
|
T |
getSecond()
Returns the second element of the Pair.
|
static <S,T> Pair<S,T> |
of(S first,
T second)
Creates a new Pair for the given elements.
|
static <S,T> Collector<Pair<S,T>,?,Map<S,T>> |
toMap()
A collector to create a Map from a Stream of Pairs.
|
Copyright © 2023 tan. All rights reserved.