/*
sopc2dts - Devicetree generation for Altera systems

Copyright (C) 2011 Walter Goossens <waltergoossens@home.nl>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/
package sopc2dts.lib.components.base;

import java.io.Serializable;

public class FlashPartition implements Serializable {
	private static final long serialVersionUID = -636328109380513658L;
	private String name;
	private int address;
	private int size;
	private boolean readonly = false;

	public FlashPartition() {
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public boolean isReadonly() {
		return readonly;
	}

	public void setReadonly(boolean readonly) {
		this.readonly = readonly;
	}
}

@@ -991,25 +991,26 @@
  = -
-63632810938051365
+489385150495858358
 8L;%0A
@@ -1135,24 +1135,178 @@
 ion() %7B%0A%09%7D%0A%0A
+%09public FlashPartition(FlashPartition fp) %7B%0A%09%09this.name = fp.name;%0A%09%09this.address = fp.address;%0A%09%09this.size = fp.size;%0A%09%09this.readonly = fp.readonly;%0A%09%7D%0A%0A
 %09public Stri
@@ -1712,24 +1712,24 @@
 readonly) %7B%0A
-
 %09%09this.reado
@@ -1747,10 +1747,353 @@
 nly;%0A%09%7D%0A
+%09%0A%09@Override%0A%09public boolean equals(Object o)%0A%09%7B%0A%09%09if(!(o instanceof FlashPartition))%0A%09%09%09return false;%0A%09%09%0A%09%09FlashPartition fp = (FlashPartition)o;%0A%09%09%0A%09%09if(readonly != fp.isReadonly())%0A%09%09%09return false;%0A%09%09%0A%09%09if(address != fp.getAddress())%0A%09%09%09return false;%0A%09%09%0A%09%09if(size != fp.getSize())%0A%09%09%09return false;%0A%09%09%0A%09%09return name.equals(fp.getName());%0A%09%7D%0A
 %7D%0A

add initializing constructor and equals functions