How to declare HashMap with different types?

Viewed 2877

I have a function, declared like this:

public synchronized void update(HashMap<String, Comparable> data)

data contains strings and ints, but the Comparable gives a warning

Comparable is a raw type. References to generic type Comparable<T> should be 
 parameterized

As I'm not overly found of warnings, question is, is there a correct way, I don't want to suppress the warning.

Thank in advance! Marcus

2 Answers
Related