Interface Supplier2<T,P1,P2>

Type Parameters:
T - 目标 类型
P1 - 参数一 类型
P2 - 参数二 类型
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Supplier2<T,P1,P2>
两个参数的Supplier
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    get(P1 p1, P2 p2)
    生成实例的方法
    default Supplier<T>
    toSupplier(P1 p1, P2 p2)
    将带有参数的Supplier转换为无参Supplier
  • Method Details

    • get

      T get(P1 p1, P2 p2)
      生成实例的方法
      Parameters:
      p1 - 参数一
      p2 - 参数二
      Returns:
      目标对象
    • toSupplier

      default Supplier<T> toSupplier(P1 p1, P2 p2)
      将带有参数的Supplier转换为无参Supplier
      Parameters:
      p1 - 参数1
      p2 - 参数2
      Returns:
      Supplier