Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10979/src/net/sourceforge/bprocessor/model
Modified Files:
Line.java Point.java
Log Message:
added copy methods
Index: Point.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Point.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Point.java 17 Oct 2006 12:20:00 -0000 1.12
--- Point.java 3 Dec 2006 17:51:23 -0000 1.13
***************
*** 92,94 ****
--- 92,104 ----
return "Point[" + getOrigin() + "]";
}
+
+ /**
+ * make a copy of the Point
+ * @return the copy
+ */
+ public Point copy() {
+ Point n = new Point();
+ n.setAttributes(this.getAttributes());
+ return n;
+ }
}
Index: Line.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Line.java 17 Oct 2006 12:20:00 -0000 1.27
--- Line.java 3 Dec 2006 17:51:23 -0000 1.28
***************
*** 418,420 ****
--- 418,430 ----
return move;
}
+
+ /**
+ * make a copy of the Line
+ * @return the copy
+ */
+ public Line copy() {
+ Line n = new Line();
+ n.setAttributes(this.getAttributes());
+ return n;
+ }
}
|