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 -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -