53 lines
1.2 KiB
Java
53 lines
1.2 KiB
Java
|
package data;
|
||
|
|
||
|
import java.util.Objects;
|
||
|
|
||
|
/*
|
||
|
Created for when words are sorted by multiple keys, i.e. not just lemmas but lemmas and msd simultaneously.
|
||
|
*/
|
||
|
public final class MultipleHMKeys5 implements MultipleHMKeys {
|
||
|
private final String k1, k2, k3, k4, k5;
|
||
|
|
||
|
public MultipleHMKeys5(String k1, String k2, String k3, String k4, String k5) {
|
||
|
this.k1 = k1;
|
||
|
this.k2 = k2;
|
||
|
this.k3 = k3;
|
||
|
this.k4 = k4;
|
||
|
this.k5 = k5;
|
||
|
}
|
||
|
|
||
|
public String getK1() {
|
||
|
return k1;
|
||
|
}
|
||
|
|
||
|
public String getK2() {
|
||
|
return k2;
|
||
|
}
|
||
|
|
||
|
public String getK3() {
|
||
|
return k3;
|
||
|
}
|
||
|
|
||
|
public String getK4() {
|
||
|
return k4;
|
||
|
}
|
||
|
|
||
|
public String getK5() {
|
||
|
return k5;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
return Objects.hash(k1, k2, k3, k4, k5);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object obj) {
|
||
|
return (obj instanceof MultipleHMKeys5) && ((MultipleHMKeys5) obj).k1.equals(k1)
|
||
|
&& ((MultipleHMKeys5) obj).k2.equals(k2)
|
||
|
&& ((MultipleHMKeys5) obj).k3.equals(k3)
|
||
|
&& ((MultipleHMKeys5) obj).k4.equals(k4)
|
||
|
&& ((MultipleHMKeys5) obj).k5.equals(k5);
|
||
|
}
|
||
|
}
|