Can 1 same comparator works for Double and String object type's like this ?
posted 8 years ago
this was my original comparator. And it is working.
As my requirements came in, what i did is added a new BOLD code as shown below.
Is it a right thing to do or better i should create a new Comparator ? My old comparator code is for Double value's and my new code added
is for String. Please i don't want to modify the existing code.
this is the new code i added above. it will return from here only when condition comes for my code