I think your only solution, given some Set implementation, is to iterate over its elements to find one that is equals() -- then you have the actual object in the Set that matched.
K target = ...;
Set set = ...;
for (K element : set) {
if (target.equals(element)) {
return element;
}
}