~fredericp/zaluum/rt

« back to all changes in this revision

Viewing changes to org.zaluum.model/src/org/zaluum/model/Point.java

  • Committer: Frederic Perez Ordeig
  • Date: 2010-04-07 07:55:38 UTC
  • mfrom: (308.1.63 wip-scala)
  • Revision ID: frederic@zaluum.com-20100407075538-muaneuoz134fqu5o
merged

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
package org.zaluum.model;
21
21
 
22
 
import java.io.Serializable;
23
22
 
24
23
/**
25
24
 * @author frede
26
25
 *
27
26
 */
28
 
public class Point implements Serializable{
29
 
        private static final long serialVersionUID = 1L;
 
27
public class Point implements Copyable<Point>{
30
28
        private final int x;
31
29
        private final int y;
32
30
        
33
 
        public Point(Point toCopy){
34
 
                this.x = toCopy.x;
35
 
                this.y = toCopy.y;
36
 
        }
37
31
        public Point(int x, int y) {
38
32
                this.x = x;
39
33
                this.y = y;
44
38
        public int getY() {
45
39
                return y;
46
40
        }
47
 
        public Point getCopy(){
48
 
                return new Point(this);
 
41
        public Point copy(){
 
42
                return this;
49
43
        }
50
44
}