|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jnario.lib.JnarioCollectionLiterals
public class JnarioCollectionLiterals
Shorter versions of the collection literals provided by Xtend.
| Constructor Summary | |
|---|---|
JnarioCollectionLiterals()
|
|
| Method Summary | ||
|---|---|---|
static
|
list(T... elements)
Creates a mutable List instance containing the given initial elements. |
|
static
|
map(org.eclipse.xtext.xbase.lib.Pair<K,V>... elements)
Creates a mutable Map instance containing the given initial entries. |
|
static
|
set(T... elements)
Creates a mutable Set instance containing the given initial elements. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JnarioCollectionLiterals()
| Method Detail |
|---|
public static <T> List<T> list(T... elements)
List instance containing the given initial elements.
initial - 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.
initial - 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.
initial - the entries that should be contained in the map. May not be null but may contain
null keys or values.
Map containing those elements
IllegalArgumentException - if duplicate keys are contained the initial entries.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||