2021-02-12 00:26:47 +01:00
|
|
|
package net.knarcraft.stargate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class allows storing two values of any type
|
2021-02-20 13:57:04 +01:00
|
|
|
*
|
2021-02-12 00:26:47 +01:00
|
|
|
* @param <K> <p>The first type</p>
|
|
|
|
* @param <L> <p>The second type</p>
|
|
|
|
*/
|
2021-02-20 13:57:04 +01:00
|
|
|
public class TwoTuple<K, L> {
|
2021-02-12 00:26:47 +01:00
|
|
|
|
|
|
|
private K firstValue;
|
|
|
|
private L secondValue;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instantiate a new TwoTuple
|
2021-02-20 13:57:04 +01:00
|
|
|
*
|
|
|
|
* @param firstValue <p>The first value</p>
|
2021-02-12 00:26:47 +01:00
|
|
|
* @param secondValue <p>The second value</p>
|
|
|
|
*/
|
|
|
|
public TwoTuple(K firstValue, L secondValue) {
|
|
|
|
this.firstValue = firstValue;
|
|
|
|
this.secondValue = secondValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the first value
|
2021-02-20 13:57:04 +01:00
|
|
|
*
|
2021-02-12 00:26:47 +01:00
|
|
|
* @return <p>The first value</p>
|
|
|
|
*/
|
|
|
|
public K getFirstValue() {
|
|
|
|
return firstValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the second value
|
2021-02-20 13:57:04 +01:00
|
|
|
*
|
2021-02-12 00:26:47 +01:00
|
|
|
* @return <p>The second value</p>
|
|
|
|
*/
|
|
|
|
public L getSecondValue() {
|
|
|
|
return secondValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|