Package org.apache.calcite.util.mapping
Class IntPair
java.lang.Object
org.apache.calcite.util.mapping.IntPair
An immutable pair of integers.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionDeprecated.static final com.google.common.collect.Ordering<IntPair>Ordering that compares pairs lexicographically: first by their source, then by their target.Deprecated.final intDeprecated.final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()Returns the left side of a list of pairs.static IntPairof(int left, int right) Returns the right side of a list of pairs.toString()Converts two lists into a list ofIntPairs, whose length is the lesser of the lengths of the source lists.Converts two lists into a list ofIntPairs.
- 
Field Details- 
SWAPDeprecated.Function that swaps source and target fields of anIntPair.
- 
ORDERINGOrdering that compares pairs lexicographically: first by their source, then by their target.
- 
LEFTDeprecated.Function that returns the left (source) side of a pair.
- 
RIGHTDeprecated.Function that returns the right (target) side of a pair.
- 
sourcepublic final int source
- 
targetpublic final int target
 
- 
- 
Constructor Details- 
IntPairpublic IntPair(int source, int target) 
 
- 
- 
Method Details- 
of
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
zipConverts two lists into a list ofIntPairs, whose length is the lesser of the lengths of the source lists.- Parameters:
- lefts- Left list
- rights- Right list
- Returns:
- List of pairs
 
- 
zippublic static List<IntPair> zip(List<? extends Number> lefts, List<? extends Number> rights, boolean strict) Converts two lists into a list ofIntPairs.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. - Parameters:
- lefts- Left list
- rights- Right list
- strict- Whether to fail if lists have different size
- Returns:
- List of pairs
 
- 
leftReturns the left side of a list of pairs.
- 
rightReturns the right side of a list of pairs.
 
-