| Modifier and Type | Class and Description |
|---|---|
private static class |
Ord.OrdArrayList<E>
List of
Ord backed by an array of elements. |
private static class |
Ord.OrdList<E>
List of
Ord backed by a list of elements. |
private static class |
Ord.OrdRandomAccessList<E>
List of
Ord backed by a random-access list of elements. |
| Modifier and Type | Method and Description |
|---|---|
Integer |
getKey() |
E |
getValue() |
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.
|
E |
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.
|
public final int i
public final E e
public Ord(int i, E e)
public static <E> Ord<E> of(int n, E e)
public static <E> Iterable<Ord<E>> zip(Iterable<? extends E> iterable)
Ords over an iterable.public static <E> Iterator<Ord<E>> zip(Iterator<? extends E> iterator)
Ords over an iterator.public static <E> Iterable<Ord<E>> reverse(E... elements)
Given the array ["a", "b", "c"], returns (2, "c") then (1, "b") then (0, "a").
public static <E> Iterable<Ord<E>> reverse(Iterable<? extends E> elements)
Given the list ["a", "b", "c"], returns (2, "c") then (1, "b") then (0, "a").
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.