i am making a lightweight event system, and i need a list of callbacks to be triggered for the event. My question is, since collections work with hashmaps and equality, how does this interact with lambdas, and how can i make sure that i can do list.remove() of the same lambda to remove it from the callbacks?
e.g
list.add(evt -> evt.toString())
list.remove(evt -> evt.toString())
Will these too always result in the same element removed?