ScrapConsumerLoader { public static <K> ScrapConsumerLoader<K> byConveyorName(String name) { return Conveyor.byName(name).scrapConsumer(); } ScrapConsumerLoader(Consumer<ScrapConsumer<K, ?>> globalPlacer, ScrapConsumer<K, ?> consumer); ScrapConsumerLoader<K> first(ScrapConsumer<K, ?> consumer); ScrapConsumerLoader<K> andThen(ScrapConsumer<K, ?> consumer); CompletableFuture<Boolean> set(); static ScrapConsumerLoader<K> byConveyorName(String name); static ScrapConsumerLoader<K> byConveyorName(String name,ScrapConsumer<K,?> scrapConsumer); static Supplier<ScrapConsumerLoader<K>> lazySupplier(String name); final ScrapConsumer<K, ?> consumer; }
@Test public void scrapConsLoaderByNameTest() { AssemblingConveyor<Integer,String,String> ac = new AssemblingConveyor<>(); ac.setName("test"); ScrapConsumerLoader<Integer> scl = ScrapConsumerLoader.byConveyorName("test",new IgnoreScrap<>()); assertNotNull(scl); }