Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Jenya Mia
Added: Mar 19, 2019 12:42 PM
Views: 12
Tags: java streams
  1. parentStorage.getInventory().stream()
  2. .filter(i -> { try
  3. {
  4.    return op.getUnit().equalsIgnoreCase(i.getUnit());
  5.  }
  6.  catch(SQLException e)
  7.  {
  8.         throw new Error(e);
  9.  }})
  10.  .map(i2 -> i2.getStorageId()).collect(Collectors.toList()));