refactor Tuple to Triplet and create Cardinal enum on utils package
This commit is contained in:
parent
77a2800a78
commit
26f0290047
@ -0,0 +1,5 @@
|
||||
package fr.lnl.game.server.utils;
|
||||
|
||||
public enum Cardinal {
|
||||
NORTH,SOUTH,EAST,WEST,NORTH_EAST,NORTH_WEST,SOUTH_EAST,SOUTH_WEST
|
||||
}
|
@ -2,19 +2,19 @@ package fr.lnl.game.server.utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Tuple<A,B,C> {
|
||||
public class Triplet<A,B,C> {
|
||||
|
||||
private A a;
|
||||
private B b;
|
||||
private C c;
|
||||
|
||||
public Tuple(A a, B b, C c){
|
||||
public Triplet(A a, B b, C c){
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public Tuple(){
|
||||
public Triplet(){
|
||||
this(null, null, null);
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class Tuple<A,B,C> {
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Tuple<?, ?, ?> tuple = (Tuple<?, ?, ?>) o;
|
||||
Triplet<?, ?, ?> tuple = (Triplet<?, ?, ?>) o;
|
||||
return Objects.equals(a, tuple.a) && Objects.equals(b, tuple.b) && Objects.equals(c, tuple.c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user