T -操作的输入类型
@FunctionalInterface public interface Consumer<T>
Consumer有望通过的副作用。
这是一个functional interface其功能的方法是accept(Object)。
void accept(T t)
t -输入参数
default Consumer<T> andThen(Consumer<? super T> after)
Consumer执行此操作,在序列,其次是
after操作。如果执行任何一个操作抛出一个异常,则将它传递给所组成的操作的调用方。如果执行此操作抛出异常,该
after操作不会被执行。
after -操作执行该操作后
Consumer,顺序执行此操作后的
after操作
NullPointerException -如果
after是空的
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.