EOS 2  1.1.0
Einfache Objektbasierte Sprache
Coordinate.java
gehe zur Dokumentation dieser Datei
1 package de.lathanda.eos.robot;
2 
9 public class Coordinate implements Comparable<Coordinate> {
10  private final int x;
11  private final int y;
12  Coordinate(int x, int y) {
13  this.x = x;
14  this.y = y;
15  }
16 
17  @Override
18  public int compareTo(Coordinate o) {
19  if (o.x != x) {
20  return o.x - x;
21  } else {
22  return o.y - y;
23  }
24  }
25 
26  public int getX() {
27  return x;
28  }
29 
30  public int getY() {
31  return y;
32  }
33 
34 }
Impressum