Timeline for How can I extend the `Set` class?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 27, 2021 at 8:42 | history | edited | Oleh Berehovskyi | CC BY-SA 4.0 |
added 4 characters in body
|
Nov 27, 2021 at 2:11 | vote | accept | Chuck | ||
Nov 26, 2021 at 20:11 | comment | added | Oleh Berehovskyi |
Yeah, you're right, I know that type inference for Set<?> is broken in Apex, but I didn't focus on this topic answering this specific question.
|
|
Nov 26, 2021 at 20:06 | comment | added | Derek F |
Unfortunately, due to how Sets work in Apex, Set<Object> is tough to use. You wouldn't be able to pass a Set<Account> into the SomeClass constructor or into retainAllIfPopulated() . Heck, even Set<Object> objSet = new Set<Object>(myAccountSet); doesn't work. This is something I ran into several years ago.
|
|
Nov 26, 2021 at 19:59 | history | answered | Oleh Berehovskyi | CC BY-SA 4.0 |