I read
this and I think that it's absolutely great. Now I'm trying to implement my own version which works fine, but I can't seem to get rid of some generics warnings.
My class looks like (simplified, evil stands for ev al which the forum doesn't allow

):
This gives me the following warning:
Type safety: The method compareTo(Object) belongs to the raw type Comparable. References to generic type Comparable<T> should be parameterized
Parameterizing to the following:
Gives me the warning:
Type safety: The cast from Object to T is actually checking against the erased type Object
How can I get rid of these warnings without using @SuppressWarnings?
Thanks in advance.