title: How to find minimum of BigDecimal field in collection with java streams?
body: <p>I want to use <strong>java streams</strong> to iterate a <strong>list</strong> and find the <code>BigDecimal</code> minimum price. The following illustrates, but does not work (because <code>min()</code> cannot accept <code>BigDecimal</code>.</p>
  
  <pre><code>class Product {
      public BigDecimal price;
  }
  
  List&lt;Product&gt; products;
  products.stream().min((Product) p -&gt; p.price);
  </code></pre>