Based on solution, presented by @Dakusan (the class defining to extend the HashMap), I did it this way:
public static HashMap<String,String> SetHash(String...pairs) {
HashMap<String,String> rtn = new HashMap<String,String>(pairs.length/2);
for ( int n=0; n < pairs.length; n+=2 ) rtn.put(pairs[n], pairs[n + 1]);
return rtn;
}
.. and using it this way:
HashMap<String,String> hm = SetHash( "one","aa", "two","bb", "tree","cc");
(Not sure if there is any disadvantages in that way (I am not a java developer, just has to do some task in java), but it works and seems to me comfortable.)