title: Java 8 streams maps with parameters
body: <p>I have this couple of functions and I would like to know if it is possible to pass the parameter <code>deviceEvent.hasAlarm()</code> to <code>.map(this::sendSMS)</code></p>
  
  <pre><code>private void processAlarm (DeviceEvent deviceEvent)  {
  
          notificationsWithGuardians.stream()
                      .filter (notification -&gt; notification.getLevels().contains(deviceEvent.getDeviceMessage().getLevel()))
                      .map(this::sendSMS)
                      .map(this::sendEmail);
  
      }
  
      private DeviceAlarmNotification sendSMS (DeviceAlarmNotification notification, DeviceEvent deviceEvent)  {
  
          if (deviceEvent.hasAlarm()) {       
  
          }
  
          return notification;
  
      }
  </code></pre>