public Emitter once ( final String event , final Listener < T > fn ) { Listener on = new Listener < T > ( ) { @ Override public void call ( T ... args ) { Emitter . this . off ( event , this ) ; fn . call ( args ) ; } } ; this . onceCallbacks . put ( fn , on ) ; this . on ( event , on ) ; return this ; }
Adds a one time listener for the event .