接口 ResourceConsumer


public interface ResourceConsumer
从以下版本开始:
4.0 2021/12/18 18:17
作者:
Harry Yang
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Performs this operation on the given argument.
    Returns a composed Consumer that performs, in sequence, this operation followed by the after operation.
  • 方法详细资料

    • accept

      void accept(Resource t) throws IOException
      Performs this operation on the given argument.
      参数:
      t - the input argument
      抛出:
      IOException
    • andThen

      default ResourceConsumer andThen(ResourceConsumer after)
      Returns a composed Consumer that performs, in sequence, this operation followed by the after operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, the after operation will not be performed.
      参数:
      after - the operation to perform after this operation
      返回:
      a composed Consumer that performs in sequence this operation followed by the after operation
      抛出:
      NullPointerException - if after is null