Skip to content

Commit

Permalink
(yegor256#1572) Generify FuncWithFallback
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryBarskov committed May 8, 2021
1 parent 7da714d commit dffe98b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/cactoos/func/FuncWithFallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ public final class FuncWithFallback<X, Y> implements Func<X, Y> {
/**
* The fallbacks.
*/
private final Iterable<Fallback<Y>> fallbacks;
private final Iterable<Fallback<? extends Y>> fallbacks;

/**
* Ctor.
* @param fnc The func
* @param fbks The fallbacks
*/
@SafeVarargs
public FuncWithFallback(final Func<X, Y> fnc, final Fallback<Y>... fbks) {
public FuncWithFallback(final Func<X, Y> fnc, final Fallback<? extends Y>... fbks) {
this(fnc, new IterableOf<>(fbks));
}

Expand All @@ -118,7 +118,7 @@ public FuncWithFallback(final Func<X, Y> fnc, final Fallback<Y>... fbks) {
* @param fbks The fallbacks
*/
public FuncWithFallback(
final Func<X, Y> fnc, final Iterable<Fallback<Y>> fbks
final Func<X, Y> fnc, final Iterable<Fallback<? extends Y>> fbks
) {
this.func = fnc;
this.fallbacks = fbks;
Expand Down

0 comments on commit dffe98b

Please sign in to comment.