| Package | Description |
|---|---|
| org.eclipse.xtext.xbase.lib |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Pair<K,V> |
Pair.of(K k,
V v)
Creates a new instance with the given key and value.
|
static <A,B> Pair<A,B> |
ObjectExtensions.operator_mappedTo(A a,
B b)
|
| Modifier and Type | Method and Description |
|---|---|
static <A> Iterable<Pair<Integer,A>> |
IterableExtensions.indexed(Iterable<? extends A> iterable)
Returns an Iterable of Pairs where the nth pair is created by taking the nth element of the source as the value
its 0-based index as the key.
|
static <A> Iterator<Pair<Integer,A>> |
IteratorExtensions.indexed(Iterator<? extends A> iterator)
Returns an Iterator of Pairs where the nth pair is created by taking the nth element of the source as the value
and its 0-based index as the key.
|
| Modifier and Type | Method and Description |
|---|---|
static <K,V> HashMap<K,V> |
CollectionLiterals.newHashMap(Pair<? extends K,? extends V>... initial)
Creates a mutable
HashMap instance containing the given initial entries. |
static <K,V> Map<K,V> |
CollectionLiterals.newImmutableMap(Pair<? extends K,? extends V>... entries)
Returns an immutable map containing the given entries.
|
static <K,V> LinkedHashMap<K,V> |
CollectionLiterals.newLinkedHashMap(Pair<? extends K,? extends V>... initial)
Creates a mutable
LinkedHashMap instance containing the given initial entries. |
static <K,V> TreeMap<K,V> |
CollectionLiterals.newTreeMap(Comparator<? super K> comparator,
Pair<? extends K,? extends V>... initial)
Creates a mutable
TreeMap instance containing the given initial entries. |
Copyright © 2015. All Rights Reserved.