Skip to content

Commit

Permalink
add example for #386
Browse files Browse the repository at this point in the history
  • Loading branch information
mebigfatguy committed Nov 4, 2024
1 parent 1646c6c commit bfc5132
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/samples/java/ex/OI_Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.util.OptionalInt;
import java.util.function.Supplier;

public class OI_Sample {
public class OI_Sample implements OptInf386 {

public String useDelayedExecution(Optional<String> o, String a, String b) {

Expand Down Expand Up @@ -73,4 +73,12 @@ public String fpGet384(String parameterName, Supplier<String> defaultValueSuppli
public boolean equalsToEmpty(Optional<String> foo) {
return foo.equals(Optional.empty());
}

public Optional<Object> getOpt386() {
return Optional.of(Double.valueOf(10));
}
}

interface OptInf386 {
Optional<Object> getOpt386();
}

0 comments on commit bfc5132

Please sign in to comment.