posted 19 years ago
I have the following bit of code where I am trying to use the Collections.binarySearch() method:
KeySet is a custom class with an iterator() method with the following signature:
When I compile this code, I get the following error message:
I don't know enough about generics to understand why this won't compile. Everything seems fine to me! Apparently I am missing some nuance to the generic mechanism that is biting me in the bud here. I would greatly appreaciate anyone that can help me figure out how to fix this.
Thanks,
Layne