mirror of
https://github.com/songoda/EpicEnchants.git
synced 2024-09-30 08:37:49 +02:00
24 lines
412 B
Java
24 lines
412 B
Java
|
package com.songoda.epicenchants.utils;
|
||
|
|
||
|
public class Tuple<key, value> {
|
||
|
private key x;
|
||
|
private value y;
|
||
|
|
||
|
public Tuple(key x, value y) {
|
||
|
this.x = x;
|
||
|
this.y = y;
|
||
|
}
|
||
|
|
||
|
public key getLeft() {
|
||
|
return this.x;
|
||
|
}
|
||
|
|
||
|
public value getRight() {
|
||
|
return this.y;
|
||
|
}
|
||
|
|
||
|
public static <key, value> Tuple of(key x, value y) {
|
||
|
return new Tuple(x, y);
|
||
|
}
|
||
|
}
|