以先前方法的输出作为输入的连续方法调用的设计模式
Design Pattern for successive method calls with previous method's output as input
当您必须将一个函数的输出作为下一个函数的输入时,是否有合适的设计模式?请参阅下面的示例
public static void main(String[] args) {
A a = computeA();
B b = computeB(a);
C c = computeC(b);
D d = computeD(c);
doSomeWork(d);
}
是流水线模式。网上有很多关于它的资料,这里是一个潜在的资源:
当您必须将一个函数的输出作为下一个函数的输入时,是否有合适的设计模式?请参阅下面的示例
public static void main(String[] args) {
A a = computeA();
B b = computeB(a);
C c = computeC(b);
D d = computeD(c);
doSomeWork(d);
}
是流水线模式。网上有很多关于它的资料,这里是一个潜在的资源: