Package org.apache.calcite.linq4j
Class Ord<E>
java.lang.Object
org.apache.calcite.linq4j.Ord<E>
- Type Parameters:
- E- Element type
Pair of an element and an ordinal.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic <T> voidforEach(Iterable<T> iterable, ObjIntConsumer<? super T> action) Applies an action to every element of an iterable, passing the zero-based ordinal of the element to the action.static <T> voidforEach(T[] ts, ObjIntConsumer<? super T> action) Applies an action to every element of an array, passing the zero-based ordinal of the element to the action.getKey()getValue()inthashCode()static <E> Ord<E>of(int n, E e) Creates an Ord.reverse(E... elements) Iterates over an array in reverse order.Iterates over a list in reverse order.zip(E[] elements) Returns a numbered list based on an array.Creates an iterable ofOrds over an iterable.Creates an iterator ofOrds over an iterator.Returns a numbered list.
- 
Field Details- 
ipublic final int i
- 
e
 
- 
- 
Constructor Details- 
OrdCreates an Ord.
 
- 
- 
Method Details- 
ofCreates an Ord.
- 
hashCodepublic int hashCode()
- 
equals
- 
zipCreates an iterable ofOrds over an iterable.
- 
zipCreates an iterator ofOrds over an iterator.
- 
zipReturns a numbered list based on an array.
- 
zipReturns a numbered list.
- 
reverseIterates over an array in reverse order.Given the array ["a", "b", "c"], returns (2, "c") then (1, "b") then (0, "a"). 
- 
reverseIterates over a list in reverse order.Given the list ["a", "b", "c"], returns (2, "c") then (1, "b") then (0, "a"). 
- 
getKey
- 
getValue
- 
setValue
- 
forEachApplies an action to every element of an iterable, passing the zero-based ordinal of the element to the action.- Type Parameters:
- T- Element type
- Parameters:
- iterable- Iterable
- action- The action to be performed for each element
- See Also:
 
- 
forEachApplies an action to every element of an array, passing the zero-based ordinal of the element to the action.- Type Parameters:
- T- Element type
- Parameters:
- ts- Array
- action- The action to be performed for each element
- See Also:
 
 
-