This is what I should know, but I draw a space on it and I have amazing difficulty trying to find the answer using google.
I am trying to extend the Java Collection , specifically ConcurrentHashMap . I want to create my own hash map class for use with nonequivalent key / value pairs, in particular, using my own classes.
So, I defined the class as such:
public class hashMap extends ConcurrentHashMap<class1, class2>
The problem is that I forget how to write constructor (s) correctly so that they are nonequivalent. For example, with the original ConcurrentHashMap you must call its constructor, which defines the classes for the key / value pairs. I just want to just call the hashMap() constructor without specifying these generics.
I tried calling super<class1, class2>(); in the constructor, but that gave me an error.
It seems that this should be something very simple, and I'm sure I knew how to do it, but some time passed, and, as I said, I draw a space.
Thanks.
Matts source share