Java, search for an element, if not found, add it
<p>I am pretty new to streams.</p>

<p>I would like to stream the <code>geometries</code> <code>EC_Geometry</code> arraylist and if the <code>EC_Geometry</code> element is not present (or better <code>equals</code> never returns <code>true</code>), then I add it.</p>

<pre><code>public void init(GL3 gl3, EC_Mesh mesh) {

    geometries.stream()
            .filter(geometry -&gt; mesh.getGeometry().equals(geometry))
            .findAny()
            .orElse(..?);
}
</code></pre>

<p>But I am stuck at the last line</p>

<p>How can I solve it using streams?</p>

<p>Please note that <code>equals</code> is a method I wrote checking if the geometry is the same (i.e: if the triangles correspond)</p>