Fix Pair class

This commit is contained in:
AppleDash 2017-01-18 07:51:54 -05:00
parent e015da4c99
commit 2d15a8075f
2 changed files with 27 additions and 20 deletions

View File

@ -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) {

View File

@ -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);
}
}