Hello,
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')
http://platform.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%…
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: String.CASE_INSENSITIVE_ORDER
#set ($myHashMap = $collectionstool.getSortedMap(String.CASE_INSENSITIVE_ORDER, String))
#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 if.)
Thxs for any help.
Pascal B