Skip to content

Instantly share code, notes, and snippets.

@sankarcheppali
Created December 28, 2019 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sankarcheppali/21781a83183bd2f8a085a0e62c7c949b to your computer and use it in GitHub Desktop.
Save sankarcheppali/21781a83183bd2f8a085a0e62c7c949b to your computer and use it in GitHub Desktop.
Generic pair class
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