Your declaration is for a variable "s", while the error message is about code related to a variable called "set". Apparently both of these are Sets, and you seem to think that they have something to do with each other. But I suspect that the compiler considers "s" and "set" to be two different things. Perhaps you could show us the declaration for "set" instead?
More to the point, what on earth is NextObject? It looks like a class or interface name, but you seem to be using it as a variable. Of course the compiler doesn't care if you disregard standard naming conventions, but you do need to define this NextObject thing somewhere. I'm guessing that whatever it is, it's not a
String, and that's why the compiler is complaining.