public class IntPair extends Object
Mapping.iterator()| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Function<IntPair,Integer> |
LEFT
Deprecated.
|
static com.google.common.collect.Ordering<IntPair> |
ORDERING
Ordering that compares pairs lexicographically: first by their source,
then by their target.
|
static com.google.common.base.Function<IntPair,Integer> |
RIGHT
Deprecated.
|
int |
source |
static com.google.common.base.Function<IntPair,IntPair> |
SWAP
Deprecated.
|
int |
target |
| Constructor and Description |
|---|
IntPair(int source,
int target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(@Nullable Object obj) |
int |
hashCode() |
static List<Integer> |
left(List<IntPair> pairs)
Returns the left side of a list of pairs.
|
static IntPair |
of(int left,
int right) |
static List<Integer> |
right(List<IntPair> pairs)
Returns the right side of a list of pairs.
|
String |
toString() |
static List<IntPair> |
zip(List<? extends Number> lefts,
List<? extends Number> rights)
Converts two lists into a list of
IntPairs,
whose length is the lesser of the lengths of the
source lists. |
static List<IntPair> |
zip(List<? extends Number> lefts,
List<? extends Number> rights,
boolean strict)
Converts two lists into a list of
IntPairs. |
@Deprecated public static final com.google.common.base.Function<IntPair,IntPair> SWAP
IntPair.public static final com.google.common.collect.Ordering<IntPair> ORDERING
@Deprecated public static final com.google.common.base.Function<IntPair,Integer> LEFT
@Deprecated public static final com.google.common.base.Function<IntPair,Integer> RIGHT
public final int source
public final int target
public static IntPair of(int left, int right)
public static List<IntPair> zip(List<? extends Number> lefts, List<? extends Number> rights)
IntPairs,
whose length is the lesser of the lengths of the
source lists.lefts - Left listrights - Right listpublic static List<IntPair> zip(List<? extends Number> lefts, List<? extends Number> rights, boolean strict)
IntPairs.
The length of the combined list is the lesser of the lengths of the source lists. But typically the source lists will be the same length.
lefts - Left listrights - Right liststrict - Whether to fail if lists have different sizepublic static List<Integer> left(List<IntPair> pairs)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.