Skip to content

Commit 8c9720b

Browse files
committed
Update documentation.
1 parent 6e4a15e commit 8c9720b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.idea/dataSources.local.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,13 +1098,13 @@ Optional.ofNullable("abc").ifPresent(stringBuilder::append); // abc
10981098
perform("def", stringBuilder::append); // abcdef
10991099
```
11001100

1101-
`Optionals` additionally provides the follwing method, which performs a "safe" cast:
1101+
`Optionals` also provides the following method, which performs a "safe" cast:
11021102

11031103
```java
11041104
public static <T> T cast(Object value, Class<T> type) {
11051105
```
11061106

1107-
If the provided value is an instance of the requested type, the cast will succeed. Otherwise, the method will return `null`. For example:
1107+
If the given value is an instance of the requested type, the cast will succeed; otherwise, the method will return `null`. For example:
11081108

11091109
```java
11101110
var text = cast("abc", String.class); // abc

kilo-client/src/main/java/org/httprpc/kilo/util/Optionals.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static <T> T coalesce(T value, Supplier<T> supplier) {
6363
* The optional value.
6464
*
6565
* @param transform
66-
* The mapping function to apply if the provided value is {@code null}.
66+
* The mapping function to apply if the provided value is not {@code null}.
6767
*
6868
* @return
6969
* The result of applying the mapping function to the provided value, or

0 commit comments

Comments
 (0)