1 changed files with 7 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||
import javafx.util.Pair; |
|||
|
|||
public class PairSwapper { |
|||
public static <K, V> Pair<V, K> swap(Pair<K, V> pair) { |
|||
return new Pair<>(pair.getValue(), pair.getKey()); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue