docs(commons): Clean up Coerce.pinF
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
This commit is contained in:
parent
e1d6f578a8
commit
bfc72b4428
|
@ -98,17 +98,21 @@ public class Coerce {
|
|||
|
||||
/**
|
||||
* Example:
|
||||
* {@code interface Test<T> {
|
||||
* T get();
|
||||
* void consume(T t);
|
||||
* <pre>
|
||||
* {@code
|
||||
* interface Test<T> {
|
||||
* T get();
|
||||
* void consume(T t);
|
||||
* }
|
||||
* class Example {
|
||||
* Test<?> instance;
|
||||
* void function() {
|
||||
* Coerce.pin(instance.get(), v -> instance.consume(v)); // This can compile
|
||||
* instance.consume(instance.get()); // This cannot
|
||||
* Test<?> instance;
|
||||
* void function() {
|
||||
* Coerce.pin(instance.get(), v -> instance.consume(v)); // This compiles
|
||||
* instance.consume(instance.get()); // This does not
|
||||
* }
|
||||
* }
|
||||
* }}
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @param value The value to pin
|
||||
* @param func The function to apply to the pinned value
|
||||
|
|
Loading…
Reference in New Issue