Exemplo n.º 1
0
 public void testExpandMultiKeys() {
   assertEquals(MapUtil.map(), MapUtil.expandAlternativeKeyLists(MapUtil.map()));
   assertEquals(MapUtil.map("1", "A"), MapUtil.expandAlternativeKeyLists(MapUtil.map("1", "A")));
   assertEquals(
       MapUtil.map("1", "A", "2", "A"),
       MapUtil.expandAlternativeKeyLists(MapUtil.map("1;2", "A")));
   assertEquals(
       MapUtil.map("1", "A", "2", "B", "*", "B"),
       MapUtil.expandAlternativeKeyLists(MapUtil.map("1", "A", "2;*", "B")));
 }
Exemplo n.º 2
0
 protected void initAuFeatureMap() {
   if (definitionMap.containsKey(DefinableArchivalUnit.KEY_AU_FEATURE_URL_MAP)) {
     Map<String, ?> featMap = definitionMap.getMap(DefinableArchivalUnit.KEY_AU_FEATURE_URL_MAP);
     for (Map.Entry ent : featMap.entrySet()) {
       Object val = ent.getValue();
       if (val instanceof Map) {
         ent.setValue(MapUtil.expandAlternativeKeyLists((Map) val));
       }
     }
   }
 }