Thursday, 15 July 2010

java - Extending TreeMap to only take Integer -> Integer mappings? -


I want to create a square that is an extension of TreeMap Is able to map to any integer no integer

P> your class

  class Try to declare as MyTreeMap TreeMap & lt; Integer, Integer & gt; {  

Note that there is no type parameter in MyTreeMap , because we know that we only want to deal with integer s .

No comments:

Post a Comment