org.jmmo.component8.Components Maven / Gradle / Ivy
package org.jmmo.component8;
/**
* User: Tomas
* Date: 16.03.13
* Time: 20:00
*/
public class Components {
// public static void collect(ComponentsContainer container, Class class1, Class class2, Handler2 handler2) {
// container.getComponentOpt(class1).ifPresent(component1 -> container.getComponentOpt(class2).ifPresent(component2 -> handler2.components(component1, component2)));
// }
// public interface Handler2 {
// public void components(T1 t1, T2 t2);
// }
//
// public static void collect(ComponentsContainer container, Class class1, Class class2,
// Class class3, Handler3 handler3) {
// container.getComponentOpt(class1).ifPresent(component1 -> container.getComponentOpt(class2).ifPresent(component2 ->
// container.getComponentOpt(class3).ifPresent(component3 -> handler3.components(component1, component2, component3))));
// }
// public interface Handler3 {
// public void components(T1 t1, T2 t2, T3 t3);
// }
//
// public static void collect(ComponentsContainer container, Class class1, Class class2,
// Class class3, Class class4, Handler4 handler4) {
// container.getComponentOpt(class1).ifPresent(component1 -> container.getComponentOpt(class2).ifPresent(component2 ->
// container.getComponentOpt(class3).ifPresent(component3 -> container.getComponentOpt(class4).ifPresent(component4 ->
// handler4.components(component1, component2, component3, component4)))));
// }
// public interface Handler4 {
// public void components(T1 t1, T2 t2, T3 t3, T4 t4);
// }
//
// public static void collect(ComponentsContainer container, Class class1, Class class2,
// Class class3, Class class4, Class class5, Handler5 handler5) {
// container.getComponentOpt(class1).ifPresent(component1 -> container.getComponentOpt(class2).ifPresent(component2 ->
// container.getComponentOpt(class3).ifPresent(component3 -> container.getComponentOpt(class4).ifPresent(component4 ->
// container.getComponentOpt(class5).ifPresent(component5 -> handler5.components(component1, component2, component3, component4, component5))))));
// }
// public interface Handler5 {
// public void components(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
// }
//
// public static void collect(ComponentsContainer container, Class class1, Class class2,
// Class class3, Class class4, Class class5, Class class6, Handler6 handler6) {
// container.getComponentOpt(class1).ifPresent(component1 -> container.getComponentOpt(class2).ifPresent(component2 ->
// container.getComponentOpt(class3).ifPresent(component3 -> container.getComponentOpt(class4).ifPresent(component4 ->
// container.getComponentOpt(class5).ifPresent(component5 -> container.getComponentOpt(class6).ifPresent(component6 ->
// handler6.components(component1, component2, component3, component4, component5, component6)))))));
// }
// public interface Handler6 {
// public void components(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6);
// }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy