Use Tuple as response

This commit is contained in:
2022-01-13 23:14:36 +01:00
parent 097cce14e8
commit b12de1cd2e
3 changed files with 64 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
package helper;
public class Tuple<X, Y> {
public final X key;
public final Y value;
public Tuple(X key, Y value) {
this.key = key;
this.value = value;
}
public X getKey() {
return key;
}
public Y getValue() {
return value;
}
@Override
public String toString() {
return "Tuple{" +
"key=" + key +
", value=" + value +
'}';
}
}