public static ProcessingChainMultiSources of( ProcessingChainSupplier[] sources, ProcessingChainEntry entry) { if (sources == null) { sources = new ProcessingChainSupplier[0]; } if (entry == null) { entry = ProcessingChainEntry.createUnknown(); } ProcessingChain[] chains = Arrays.stream(sources) .map(it -> it == null ? ProcessingChain.createUnknown() : it.getProcessingChain()) .toArray(ProcessingChain[]::new); return of(chains, entry); }
public static ProcessingChainMultiSources of( ProcessingChain[] sources, ProcessingChainEntry entry) { if (sources == null) { sources = new ProcessingChain[0]; } for (int i = 0; i < sources.length; i++) { if (sources[i] == null) { sources[i] = ProcessingChain.createUnknown(); } } if (entry == null) { entry = ProcessingChainEntry.createUnknown(); } return new ProcessingChainMultiSources(sources, entry); }