为指定图片增加阴影

@param map    　图片
@param radius 　阴影的半径
@return
422871
public static Bitmap drawShadow(Bitmap map, int radius) {
        if (map == null)
            return null;

        BlurMaskFilter blurFilter = new BlurMaskFilter(radius, BlurMaskFilter.Blur.OUTER);
        Paint shadowPaint = new Paint();
        shadowPaint.setMaskFilter(blurFilter);

        int[] offsetXY = new int[2];
        Bitmap shadowImage = map.extractAlpha(shadowPaint, offsetXY);
        shadowImage = shadowImage.copy(Config.ARGB_8888, true);
        Canvas c = new Canvas(shadowImage);
        c.drawBitmap(map, -offsetXY[0], -offsetXY[1], null);
        return shadowImage;
    }
158652
public static MapProxy create(Map<?, ?> map) {
		return (map instanceof MapProxy) ? (MapProxy) map : new MapProxy(map);
	}
1110021
private void add(TreeMap<String, Object> map, String key, Object value) {
		// ZAP: Added the type argument.
	    Vector<Object> v = getList(map, key);
	    if (v == null) {
	    	// ZAP: Added the type argument.
	        v = new Vector<>();
	        synchronized (map) {
	            map.put(key, v);
	        }
	    }
	    if (!v.contains(value)) {
	        v.add(value);
	    }

	}
569000
public static <K, V> MapWrapper<K, V> wrap(Map<K, V> map) {
		return new MapWrapper<K, V>(map);
	}
638589
public void putMap (Map<String,String> map) {                                                       //SIB0163.comms.1
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putMap", "map="+map);

     if (map != null) {
       final Set<String> keys = map.keySet();
       putShort(keys.size()); // Number of entries
       for (String k: keys) {
         putString(k);
         putString(map.get(k));
       }
     } else {
       putShort(0);
     }

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "putMap");
   }
45874
public M put(Map<String, Object> map) {
		attrs.putAll(map);
		return (M)this;
	}
812400
public static <K,V> List<Pair<K,V>> mapToPair(Map<K,V> map) {
        List<Pair<K,V>> ret = new ArrayList<>(map.size());
        for(Map.Entry<K,V> entry : map.entrySet()) {
            ret.add(Pair.of(entry.getKey(),entry.getValue()));
        }

        return ret;
    }
176018
public static <K, V> Map<K, V> immutableMapCopy(Map<K, V> map) {
      if (map == null) return null;
      if (map.isEmpty()) return Collections.emptyMap();
      if (map.size() == 1) {
         Map.Entry<K, V> me = map.entrySet().iterator().next();
         return Collections.singletonMap(me.getKey(), me.getValue());
      }

      Map<? extends K, ? extends V> copy = ObjectDuplicator.duplicateMap(map);

      if (copy == null)
         copy = attemptCopyConstructor(map, Map.class);
      if (copy == null)
         copy = new HashMap<>(map);

      return new ImmutableMapWrapper<>(copy);
   }
1073623
public static GoogleMapShape addShapeToMap(GoogleMap map,
                                               GoogleMapShape shape) {

        GoogleMapShape addedShape = null;

        switch (shape.getShapeType()) {

            case LAT_LNG:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MARKER, addLatLngToMap(map,
                        (LatLng) shape.getShape()));
                break;
            case MARKER_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MARKER, addMarkerOptionsToMap(map,
                        (MarkerOptions) shape.getShape()));
                break;
            case POLYLINE_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.POLYLINE, addPolylineToMap(map,
                        (PolylineOptions) shape.getShape()));
                break;
            case POLYGON_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.POLYGON, addPolygonToMap(map,
                        (PolygonOptions) shape.getShape()));
                break;
            case MULTI_LAT_LNG:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_MARKER, addLatLngsToMap(map,
                        (MultiLatLng) shape.getShape()));
                break;
            case MULTI_POLYLINE_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_POLYLINE, addPolylinesToMap(map,
                        (MultiPolylineOptions) shape.getShape()));
                break;
            case MULTI_POLYGON_OPTIONS:
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.MULTI_POLYGON, addPolygonsToMap(map,
                        (MultiPolygonOptions) shape.getShape()));
                break;
            case COLLECTION:
                List<GoogleMapShape> addedShapeList = new ArrayList<GoogleMapShape>();
                @SuppressWarnings("unchecked")
                List<GoogleMapShape> shapeList = (List<GoogleMapShape>) shape
                        .getShape();
                for (GoogleMapShape shapeListItem : shapeList) {
                    addedShapeList.add(addShapeToMap(map, shapeListItem));
                }
                addedShape = new GoogleMapShape(shape.getGeometryType(),
                        GoogleMapShapeType.COLLECTION, addedShapeList);
                break;
            default:
                throw new GeoPackageException("Unsupported Shape Type: "
                        + shape.getShapeType());

        }

        return addedShape;
    }
690921
public static CallbackResult<Void> registerIcons(TextureMap map)
	{
		registeredIcons.values().forEach(icon -> icon.register(map));
		vanillaIcons.values().forEach(icon -> icon.register(map));
		return CallbackResult.noResult();
	}
294147
public static <K, E> Set<E> getAndPutSetIfAbsent(final Map<K, Set<E>> map, final K key) {
        Set<E> v = map.get(key);

        if (v == null) {
            v = new HashSet<>();
            v = map.put(key, v);
        }

        return v;
    }
342169
public static <A, B> LambdaMap<A, B> wrap(Map<A, B> map) {
        return new LambdaMap<>(map);
    }
377300
public final <R> Parser<R> map(final Function<? super T, ? extends R> map) {
    return new Parser<R>() {
      @Override boolean apply(final ParseContext ctxt) {
        final boolean r = Parser.this.apply(ctxt);
        if (r) {
          ctxt.result = map.apply(Parser.this.getReturn(ctxt));
        }
        return r;
      }
      @Override public String toString() {
        return map.toString();
      }
    };
  }
845380
public static Mapper mapMapper(final Map map) {
        return new Mapper() {
            public Object map(final Object a) {
                return map.get(a);
            }
        };
    }
187557
private void putAllIfAbsent(final Map<String, String> baseMap, final Map<String, String> map) {
		for (Map.Entry<String, String> entry : map.entrySet()) {
			if (!baseMap.containsKey(entry.getKey())) {
				baseMap.put(entry.getKey(), entry.getValue());
			}
		}
	}
799084
public static List<Map<String, Object>> nest(String key, Map<String, Object> map) {
        List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
        String patternString = MessageFormat.format("^{0}\\.([0-9]*)\\.(.*)", Pattern.quote(key));
        Pattern pattern = Pattern.compile(patternString);
        for (Map.Entry<String, Object> entry : map.entrySet()) {
            String k = entry.getKey();
            Matcher matcher = pattern.matcher(k);
            if (matcher.matches()) {
                int base = 0;
                processMatch(result, entry.getValue(), matcher, base);
            }
        }
        return result;
    }
617075
public static <V> Map<String, V> cleanupMap(Map<String, V> map) {
        if (map == null || map.isEmpty()) {
            return null;
        }

        Map<String, V> result = new HashMap<String, V>(map.size());
        Set<Entry<String, V>> entries = map.entrySet();

        for (Entry<String, V> entry : entries) {
            if (entry.getValue() != null) {
                result.put(entry.getKey(), entry.getValue());
            }
        }

        return result;
    }