public class JnarioCollectionLiterals extends Object
| Constructor and Description |
|---|
JnarioCollectionLiterals() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
list(T... elements)
Creates a mutable
List instance containing the given initial elements. |
static <K,V> Map<K,V> |
map(org.eclipse.xtext.xbase.lib.Pair<K,V>... elements)
Creates a mutable
Map instance containing the given initial entries. |
static <T> Set<T> |
set(T... elements)
Creates a mutable
Set instance containing the given initial elements. |
public static <T> List<T> list(T... elements)
List instance containing the given initial elements.elements - the initial elements that the list should contain, in order. May not be null but may
contain null values.List containing those elementspublic static <T> Set<T> set(T... elements)
Set instance containing the given initial elements.elements - the initial elements that the set should contain, in order. May not be null but may
contain null values.Set containing those elementspublic static <K,V> Map<K,V> map(org.eclipse.xtext.xbase.lib.Pair<K,V>... elements)
Map instance containing the given initial entries. Repeated occurrences of a keys
will cause an IllegalArgumentException.elements - the entries that should be contained in the map. May not be null but may contain
null keys or values.Map containing those elementsIllegalArgumentException - if duplicate keys are contained the elements entries.Copyright © 2012-2014 BMW Car IT. All Rights Reserved.