예제 #1
0
 static {
   Coordinates = MapUtil.map();
   Coordinates.put(Continent.NorthAmerica, "200,100,50");
   Coordinates.put(Continent.SouthAmerica, "250,250,50");
   Coordinates.put(Continent.Europe, "450,75,30");
   Coordinates.put(Continent.Asia, "550,100,50");
   Coordinates.put(Continent.Africa, "400,200,50");
   Coordinates.put(Continent.Australia, "650,250,30");
   Coordinates.put(Continent.Antarctica, "400,400,20");
 }
 public Object get(String key, boolean ignoresCase) {
   Object element;
   if (ignoresCase) {
     if (_lowercaseTable == null) {
       _lowercaseTable = MapUtil.map();
       Iterator keys = keySet().iterator();
       while (keys.hasNext()) {
         String currentKey = (String) keys.next();
         Object currentElement = super.get(currentKey);
         _lowercaseTable.put(currentKey.toLowerCase(), currentElement);
       }
     }
     element = _lowercaseTable.get(key.toLowerCase());
   } else {
     element = super.get(key);
   }
   return element;
 }