public synchronized void sendNotification ( Supplier < String > textSupplier , Supplier < U > userDataSupplier , LongSupplier timestampSupplier ) { if ( ! map . isEmpty ( ) ) { sendNotification ( textSupplier . get ( ) , userDataSupplier . get ( ) , timestampSupplier . getAsLong ( ) ) ; } }
Send notification . supplier is called only if there are listeners