Merge pull request #1622 from danieltaub96/master

fixed ExtensionMethod example to return T (generic type)
This commit is contained in:
Reinier Zwitserloot authored and GitHub committed 2018-03-27 21:44:36 +02:00
commit e4a9bd288b
1 file changed
+1 -1
@@ -36,7 +36,7 @@
</p><p>
Lombok does not (currently) have any runtime dependencies which means lombok does not (currently) ship with any useful extension methods so you'll have to make your own. However, here's one that might spark your imagination: <br />
<pre>public class ObjectExtensions {
public static &lt;T&gt; or(T object, T ifNull) {
public static &lt;T&gt; T or(T object, T ifNull) {
return object != null ? object : ifNull;
}
}</pre><br />