private static < V > TreeMap < String , V > getValuesMap ( String prefix , ParamReader < V > reader ) { TreeMap < String , V > map = null ; Iterator iter = config ( ) . getKeys ( prefix ) ; while ( iter . hasNext ( ) ) { String key = iter . next ( ) . toString ( ) ; if ( map == null ) { map = new TreeMap ( keysComparator ) ; // make sure that all keys are inserted by their configured order } map . put ( key , reader . readValue ( key ) ) ; } return map ; }
return a map with all keys and values where the entries are sorted by the configured order