mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-09-27 14:12:58 +02:00
Fix Pair class
This commit is contained in:
parent
e015da4c99
commit
2d15a8075f
@ -108,27 +108,7 @@ public class ItemDatabase {
|
||||
return itemName.toLowerCase().replace("_", "").replace(" ", "");
|
||||
}
|
||||
|
||||
public static class Pair<K, V> {
|
||||
private final K left;
|
||||
private final V right;
|
||||
|
||||
public Pair(K left, V right) {
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public K getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public V getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
public static <K, V> Pair of(K k, V v) {
|
||||
return new Pair<>(k, v);
|
||||
}
|
||||
}
|
||||
|
||||
public static class InvalidItemException extends Exception {
|
||||
public InvalidItemException(String message) {
|
||||
|
@ -0,0 +1,27 @@
|
||||
package org.appledash.saneeconomysignshop.util;
|
||||
|
||||
/**
|
||||
* Created by appledash on 1/18/17.
|
||||
* Blackjack is best pony.
|
||||
*/
|
||||
public class Pair<K, V> {
|
||||
private final K left;
|
||||
private final V right;
|
||||
|
||||
public Pair(K left, V right) {
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
public K getLeft() {
|
||||
return left;
|
||||
}
|
||||
|
||||
public V getRight() {
|
||||
return right;
|
||||
}
|
||||
|
||||
public static <K, V> Pair<K, V> of(K k, V v) {
|
||||
return new Pair<>(k, v);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user