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
Post a Comment