mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
fix code
This commit is contained in:
parent
3aac1e9af6
commit
3b3498c8a1
@ -34,6 +34,11 @@ public class ComposeFunction<A, B, C> implements Function<A, C>, Serializable {
|
||||
private final Function<B, C> g;
|
||||
private final Function<A, ? extends B> f;
|
||||
|
||||
/**
|
||||
* 构造
|
||||
* @param g 函数1
|
||||
* @param f 函数2
|
||||
*/
|
||||
public ComposeFunction(final Function<B, C> g, final Function<A, ? extends B> f) {
|
||||
this.g = Assert.notNull(g);
|
||||
this.f = Assert.notNull(f);
|
||||
|
@ -9,6 +9,9 @@ import java.util.function.BiFunction;
|
||||
/**
|
||||
* SerBiFunction
|
||||
*
|
||||
* @param <T> 参数1的类型
|
||||
* @param <U> 参数2的类型
|
||||
* @param <R> 返回值类型
|
||||
* @author VampireAchao
|
||||
* @since 2022/6/8
|
||||
*/
|
||||
|
@ -7,10 +7,12 @@ import java.util.Objects;
|
||||
import java.util.function.BiPredicate;
|
||||
|
||||
/**
|
||||
* SerBiPred
|
||||
* 可序列化的BiPredicate
|
||||
*
|
||||
* @param <T> 参数1的类型
|
||||
* @param <U> 参数2的类型
|
||||
* @author VampireAchao
|
||||
* @since 2022/6/8
|
||||
* @since 6.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SerBiPredicate<T, U> extends BiPredicate<T, U>, Serializable {
|
||||
|
@ -12,6 +12,7 @@ import java.util.function.BinaryOperator;
|
||||
*
|
||||
* @author VampireAchao
|
||||
* @since 2022/6/8
|
||||
* @param <T> 参数和返回值类型
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SerBinaryOperator<T> extends BinaryOperator<T>, Serializable {
|
||||
|
@ -10,6 +10,7 @@ import java.util.stream.Stream;
|
||||
/**
|
||||
* 可序列化的Consumer
|
||||
*
|
||||
* @param <T> 参数类型
|
||||
* @author VampireAchao
|
||||
* @see Consumer
|
||||
*/
|
||||
@ -47,7 +48,8 @@ public interface SerConsumer<T> extends Consumer<T>, Serializable {
|
||||
*/
|
||||
@SafeVarargs
|
||||
static <T> SerConsumer<T> multi(final SerConsumer<T>... consumers) {
|
||||
return Stream.of(consumers).reduce(SerConsumer::andThen).orElseGet(() -> o -> {});
|
||||
return Stream.of(consumers).reduce(SerConsumer::andThen).orElseGet(() -> o -> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,6 +79,7 @@ public interface SerConsumer<T> extends Consumer<T>, Serializable {
|
||||
* @return nothing
|
||||
*/
|
||||
static <T> SerConsumer<T> nothing() {
|
||||
return t -> {};
|
||||
return t -> {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ import java.util.function.Function;
|
||||
/**
|
||||
* 可序列化的Function
|
||||
*
|
||||
* @param <T> 参数类型
|
||||
* @param <R> 返回值类型
|
||||
* @author VampireAchao
|
||||
* @see Function
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@ import java.util.stream.Stream;
|
||||
*
|
||||
* @author VampireAchao
|
||||
* @see Predicate
|
||||
* @param <T> 参数类型
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SerPredicate<T> extends Predicate<T>, Serializable {
|
||||
|
@ -9,9 +9,9 @@ import java.util.stream.Stream;
|
||||
/**
|
||||
* 可序列化的Supplier
|
||||
*
|
||||
* @param <R> 返回值类型
|
||||
* @author VampireAchao
|
||||
* @see Supplier
|
||||
* @param <R> 返回值类型
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SerSupplier<R> extends Supplier<R>, Serializable {
|
||||
|
Loading…
Reference in New Issue
Block a user