package de.uni_koeln.spinfo.drc.mongodb.data.light;

import de.uni_koeln.spinfo.drc.mongodb.data.Rectangle;

public class RectangleLight {

	private int x;
	private int y;
	private int width;
	private int height;
	private String id;


	public RectangleLight(final String id, Rectangle rectangle) {
		this.id = id;
		this.x = rectangle.getX();
		this.y = rectangle.getY();
		this.width = rectangle.getWidth();
		this.height = rectangle.getHeight();
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	

}

@@ -919,16 +919,976 @@
 = id;%0A%09%7D
+%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + height;%0A%09%09result = prime * result + ((id == null) ? 0 : id.hashCode());%0A%09%09result = prime * result + width;%0A%09%09result = prime * result + x;%0A%09%09result = prime * result + y;%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09RectangleLight other = (RectangleLight) obj;%0A%09%09if (height != other.height)%0A%09%09%09return false;%0A%09%09if (id == null) %7B%0A%09%09%09if (other.id != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!id.equals(other.id))%0A%09%09%09return false;%0A%09%09if (width != other.width)%0A%09%09%09return false;%0A%09%09if (x != other.x)%0A%09%09%09return false;%0A%09%09if (y != other.y)%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22RectangleLight %5Bx=%22 + x + %22, y=%22 + y + %22, width=%22 + width%0A%09%09%09%09+ %22, height=%22 + height + %22%5D%22;%0A%09%7D
 %0A%09%0A%09%0A%0A%7D%0A

Add hash, equals and toString methods