Created
November 13, 2013 15:21
-
-
Save jonfriesen/7450800 to your computer and use it in GitHub Desktop.
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
/** Inner class for entries */ | |
protected static class MyEntry<K,V> implements Entry<K,V> { | |
protected K k; // key | |
protected V v; // value | |
public MyEntry(K key, V value) { | |
k = key; | |
v = value; | |
} | |
// methods of the Entry interface | |
public K getKey() { return k; } | |
public V getValue() { return v; } | |
// overrides toString, useful for debugging | |
public String toString() { return "(" + k + "," + v + ")"; } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment