java 8 - Java8: foreach set and calling a method with a parameter -


i'm struggling coming out right syntax this:

i have functionalinterface:

@functionalinterface interface observer {     void notifyme(packet p); }; 

and i'm trying make following call:

packet -> observers.foreach(observer::notifyme); 

it doesn't compile! idea how make work?

thanks!


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

.net - Generate assembly with Roslyn -

batch file - filebot superstrict script: need tiny video sample or other solution -