Code example for WeakHashMap

Methods: containsKey, get, put

0
	} 
 
	protected WeakHashMap<Integer, Double> data = new WeakHashMap<Integer, Double>();
	 
	public void addData(int catid, double increm) {
		if (data.containsKey(catid)) {
			double append = data.get(catid);
			data.put(catid, increm + append);
		} else { 
			data.put(catid, increm);
		} 
	} 
	 
	public void draw(Canvas canvas, AtlasView view) {
		rectf = new RectF(view.getHeight() / 4, view.getHeight() / 4, view.getHeight() / 4, view.getHeight() / 4);
		rectf.set(canvas.getHeight() / 8, canvas.getHeight() / 8, canvas.getHeight(), canvas.getHeight());
		Log.d("Atlas", rectf.width() + " " + rectf.height());
		if ( in != null ) {
			in.setText("INCOME");
		} 
		if ( out != null ) {