We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fb29f6 commit 5479eeeCopy full SHA for 5479eee
1 file changed
README.md
@@ -71,10 +71,13 @@ You can ignore any errors and only use the `ok` values _(when available)_.
71
pe.imports.ifOk(imports -> printImports(imports));
72
```
73
74
-Or, you can use a classic `null` check.
+Or, you can use a classic `null` check _(and log errors on the side)_.
75
76
```java
77
-ArrayList<LibraryImports> imports = pe.imports.getOkOrDefault(null);
+ArrayList<LibraryImports> imports = pe.imports
78
+ .ifErr(err -> System.out.println(err)) // Optional call
79
+ .getOkOrDefault(null);
80
+
81
if (imports != null)
82
printImports(imports);
83
0 commit comments