with velocity I have a hashmap: sort of variable with (key:value) that I want 
to sort, then I use:
#set ($myHashMap = $collectionstool.getSortedMap(String, String))
$myHashMap.put('Mykey3','My value 3')

It's working well ... except with uppercase because I want a sort with 
insensitive case.

I tried to decrypt Javadoc and I found I could use: 
#set ($myHashMap = $collectionstool.getSortedMap(String.CASE_INSENSITIVE_ORDER, 
#set ($myHashMap = $collectionstool.getSortedMap(String::compareToIgnoreCase, 
String)) with java8
but unfortunaly it doesn't work (I have xwiki error)

Any idea to sort my hashmap with with insensitive case?

(Unfortunaly the better way I found is an ugly way: I mix velocity with a piece 
of groovy but I'm not satisfied at all because I use velocity loop and other 

Thxs for any help.

Pascal B

Reply via email to