Code example for LinkedList

Methods: contains

0
		updatePositions(); 
	} 
	 
	public boolean contains(DraggableBox d)
	{ 
		return tiles.contains(d);
	} 
	 
	//Draws method. Takes canvas as parameter 
	public void draw(Canvas canvas)
	{ 
		Paint dragRectangle = new Paint();
		dragRectangle.setColor(Color.BLACK);
		canvas.drawRect(dragBorder, dragRectangle);
		dragRectangle.setColor(Color.rgb(68, 89, 108));
		canvas.drawRect(dragFill, dragRectangle);
		for(DraggableBox d: (LinkedList<DraggableBox>) tiles.clone())
			d.draw(canvas);
 
	}