Code example for TreeMap

Methods: put

0
public class MappingFileProviderTest extends TestCase {
  private final MappingFileProvider mappingProvider = new MappingFileProvider();
  private static final Logger LOGGER = Logger.getLogger(MappingFileProviderTest.class.getName());
 
  public MappingFileProviderTest() { 
    SortedMap<Integer, Set<String>> mapping = new TreeMap<Integer, Set<String>>();
    mapping.put(1, newHashSet("en"));
    mapping.put(86, newHashSet("zh", "en", "zh_Hant"));
    mapping.put(41, newHashSet("de", "fr", "it", "rm"));
    mapping.put(65, newHashSet("en", "zh_Hans", "ms", "ta"));
 
    mappingProvider.readFileConfigs(mapping);
  } 
 
  private static HashSet<String> newHashSet(String... strings) {
    HashSet<String> set = new HashSet<String>();
    set.addAll(Arrays.asList(strings));
    return set;
  } 
 
  public void testReadWriteExternal() {