Skip to content

Commit

Permalink
docs: add additional javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Mar 10, 2023
1 parent 6d65261 commit 591d621
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/main/java/tech/favware/java8_result/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ static <U> Result<U> ofOptional(Optional<U> op) {
return ofOptional(op, new IllegalArgumentException("Missing Value"));
}

/**
* @return true if the {@link Result} is {@link Ok}
*/
boolean isOk();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
package tech.favware.java8_result;

/**
* @param <T> the type of the input to the function
* @param <R> the type of the result of the function
*/
public interface ResultMapFunction<T, R> {

/**
* @param t the input argument
* @return the result of the function
* @throws Throwable the type of throwable thrown by this method
*/
@SuppressWarnings("java:S112")
R apply(T t) throws Throwable;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
*/
public interface ResultSupplier<T> {

/**
* @return the result of the operation
* @throws Throwable the type of throwable thrown by this method
*/
@SuppressWarnings("java:S112")
T get() throws Throwable;
}

0 comments on commit 591d621

Please sign in to comment.