Class Ord<E>

java.lang.Object
org.apache.calcite.linq4j.Ord<E>
Type Parameters:
E - Element type
All Implemented Interfaces:
Map.Entry<Integer,E>

public class Ord<E> extends Object implements Map.Entry<Integer,E>
Pair of an element and an ordinal.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final E
     
    final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ord(int i, E e)
    Creates an Ord.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(@Nullable Object obj)
     
    static <T> void
    forEach(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> void
    forEach(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.
     
     
    int
     
    static <E> Ord<E>
    of(int n, E e)
    Creates an Ord.
    static <E> Iterable<Ord<E>>
    reverse(E... elements)
    Iterates over an array in reverse order.
    static <E> Iterable<Ord<E>>
    reverse(Iterable<? extends E> elements)
    Iterates over a list in reverse order.
    setValue(E value)
     
    static <E> List<Ord<E>>
    zip(E[] elements)
    Returns a numbered list based on an array.
    static <E> Iterable<Ord<E>>
    zip(Iterable<? extends E> iterable)
    Creates an iterable of Ords over an iterable.
    static <E> Iterator<Ord<E>>
    zip(Iterator<? extends E> iterator)
    Creates an iterator of Ords over an iterator.
    static <E> List<Ord<E>>
    zip(List<? extends E> elements)
    Returns a numbered list.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • i

      public final int i
    • e

      public final E e
  • Constructor Details

    • Ord

      public Ord(int i, E e)
      Creates an Ord.
  • Method Details