forked from plusone/plusone-commons
删除多余的函数式接口
parent
e5cd981508
commit
5932bbd53f
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.function.DoubleFunction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DoubleToOptionalFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 double 的参数,返回 {@code Optional<R>} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see Optional
|
|
||||||
* @see DoubleFunction
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface DoubleToOptionalFunction<R> extends DoubleFunction<Optional<R>> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.function.IntFunction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IntToOptionalFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 int 的参数,返回 {@code Optional<R>} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see Optional
|
|
||||||
* @see IntFunction
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface IntToOptionalFunction<R> extends IntFunction<Optional<R>> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.function.LongFunction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* LongToOptionalFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 long 的参数,返回 {@code Optional<R>} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see Optional
|
|
||||||
* @see LongFunction
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface LongToOptionalFunction<R> extends LongFunction<Optional<R>> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalDouble;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OptionalDoubleSupplier
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 返回 {@link OptionalDouble} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalDouble
|
|
||||||
* @see Supplier
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface OptionalDoubleSupplier extends Supplier<OptionalDouble> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalInt;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OptionalIntSupplier
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 返回 {@link OptionalInt} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalInt
|
|
||||||
* @see Supplier
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface OptionalIntSupplier extends Supplier<OptionalInt> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalLong;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OptionalLongSupplier
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 返回 {@link OptionalLong} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalLong
|
|
||||||
* @see Supplier
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface OptionalLongSupplier extends Supplier<OptionalLong> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalDouble;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ToOptionalDoubleFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 T 的参数,返回 {@link OptionalDouble} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalDouble
|
|
||||||
* @see Function
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface ToOptionalDoubleFunction<T> extends Function<T, OptionalDouble> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalInt;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ToOptionalIntFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 T 的参数,返回 {@link OptionalInt} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalInt
|
|
||||||
* @see Function
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface ToOptionalIntFunction<T> extends Function<T, OptionalInt> {
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2023-2024 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.function;
|
|
||||||
|
|
||||||
import java.util.OptionalLong;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ToOptionalLongFunction
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* 接受类型为 T 的参数,返回 {@link OptionalLong} 对象。
|
|
||||||
*
|
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
|
||||||
* @since 0.1.0
|
|
||||||
* @see OptionalLong
|
|
||||||
* @see Function
|
|
||||||
*/
|
|
||||||
@FunctionalInterface
|
|
||||||
public interface ToOptionalLongFunction<T> extends Function<T, OptionalLong> {
|
|
||||||
}
|
|
Loading…
Reference in New Issue