Skip to content

Commit

Permalink
Fix directMapper methods not being public
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Apr 13, 2024
1 parent 1f9085f commit 550317b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.incendo.cloud.parser.ArgumentParseResult;
import org.incendo.cloud.type.tuple.Pair;

import static java.util.Objects.requireNonNull;

public final class AggregateParserPairBuilder<C, U, V, O> {

/**
Expand Down Expand Up @@ -127,8 +129,9 @@ public AggregateParser<C, O> build() {
* @param <O> output type
* @return mapper
*/
static <C, U, V, O> Mapper<C, U, V, O> directMapper(final Mapper.DirectSuccessMapper<C, U, V, O> mapper) {
return mapper;
public static <C, U, V, O> @NonNull Mapper<C, U, V, O> directMapper(
final Mapper.@NonNull DirectSuccessMapper<C, U, V, O> mapper) {
return requireNonNull(mapper, "mapper");
}

public interface Mapper<C, U, V, O> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.incendo.cloud.parser.ArgumentParseResult;
import org.incendo.cloud.type.tuple.Triplet;

import static java.util.Objects.requireNonNull;

public final class AggregateParserTripletBuilder<C, U, V, Z, O> {

/**
Expand Down Expand Up @@ -134,8 +136,9 @@ public AggregateParser<C, O> build() {
* @param <O> output type
* @return mapper
*/
static <C, U, V, Z, O> Mapper<C, U, V, Z, O> directMapper(final Mapper.DirectSuccessMapper<C, U, V, Z, O> mapper) {
return mapper;
public static <C, U, V, Z, O> @NonNull Mapper<C, U, V, Z, O> directMapper(
final Mapper.@NonNull DirectSuccessMapper<C, U, V, Z, O> mapper) {
return requireNonNull(mapper, "mapper");
}

public interface Mapper<C, U, V, Z, O> {
Expand Down

0 comments on commit 550317b

Please sign in to comment.