L - 泛型R - 泛型public class Pair<L,R> extends Object
| Modifier and Type | Method and Description |
|---|---|
static <L,R> Pair<L,R> |
create(L left,
R right) |
static <L,R> Pair<L,R> |
createLeft(L left)
Constructs a pair with its left value being
left, or returns an empty pair if
left is null. |
static <L,R> Pair<L,R> |
createRight(R right)
Constructs a pair with its right value being
right, or returns an empty pair if
right is null. |
static <L,R> Pair<L,R> |
empty()
Returns an empty pair.
|
public static <L,R> Pair<L,R> empty()
public static <L,R> Pair<L,R> createLeft(L left)
left, or returns an empty pair if
left is null.L - 泛型R - 泛型left - leftleft is null.public static <L,R> Pair<L,R> createRight(R right)
right, or returns an empty pair if
right is null.L - 泛型R - 泛型right - rightright is null.public static <L,R> Pair<L,R> create(L left, R right)
Copyright © 2024. All rights reserved.