|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.abhinavsarkar.spelhelper.ExtensionFunctions
public final class ExtensionFunctions
Provides some extension functions to create some basic collection types
inline in SpEL expressions.
These functions are automatically registered with SpelHelper
.
See Also: Spring Docs on extension functions
Method Summary | ||
---|---|---|
static
|
list(T... args)
Creates an unmodifiable List of the arguments provided. |
|
static
|
map(List<? extends K> keys,
List<? extends V> values)
Creates an unmodifiable Map using the List of keys
provided as the first argument and the List of values provided
as the second argument. |
|
static
|
set(T... args)
Creates an unmodifiable Set of the arguments provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> List<T> list(T... args)
Creates an unmodifiable List
of the arguments provided.
Example use: "#list('one', 'two', 'three')"
T
- Type of the arguments provided.args
- Arguments to create list of.
public static <T> Set<T> set(T... args)
Creates an unmodifiable Set
of the arguments provided.
Example use: "#set('one', 'two', 'three')"
T
- Type of the arguments provided.args
- Arguments to create set of.
public static <K,V> Map<K,V> map(List<? extends K> keys, List<? extends V> values)
Creates an unmodifiable Map
using the List
of keys
provided as the first argument and the List
of values provided
as the second argument.
Example use: "#map(#list('one', 'two', 'three'), #list(1, 2, 3))"
K
- Type of the keys of the map.V
- Type of the values of map.keys
- List of the keys.values
- List of the values.
IllegalArgumentException
- if the number of keys and the number of
values is not equal.
|
Code hosted at github | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |