Created
December 28, 2019 06:41
-
-
Save sankarcheppali/21781a83183bd2f8a085a0e62c7c949b to your computer and use it in GitHub Desktop.
Generic pair class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pair<T,R> { | |
private T key; | |
private R value; | |
public Pair(T key, R value) { | |
this.key = key; | |
this.value = value; | |
} | |
public T getKey() { | |
return key; | |
} | |
public R getValue() { | |
return value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment