Skip to content

Instantly share code, notes, and snippets.

@GertjanBrouwer
Created May 18, 2018 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GertjanBrouwer/67fd3920765d669a83dfc7825e5dee5f to your computer and use it in GitHub Desktop.
Save GertjanBrouwer/67fd3920765d669a83dfc7825e5dee5f to your computer and use it in GitHub Desktop.
package tspsim;
public class Product implements Cloneable{
private int id;
private int x;
private int y;
public Product(int id, int x, int y) {
this.id = id;
this.x = x;
this.y = y;
}
public int getId(){
return this.id;
}
public int getX() {
return this.x;
}
public int getY() {
return this.y;
}
public String toString() {
return "id:" + String.valueOf(this.id) + " x:" + String.valueOf(this.x) + " y:" + String.valueOf(this.y);
}
public Product clone() throws CloneNotSupportedException{
Product clone = (Product)super.clone();
return clone;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment