Class ChainUtils


  • public class ChainUtils
    extends Object
    Author:
    Christian Ohr, Dmytro Rud
    • Constructor Detail

      • ChainUtils

        public ChainUtils()
    • Method Detail

      • createChain

        public static <T extends ChainableList<T> createChain​(List<T> initial,
                                                                Collection<T> custom)
        Extends an initial chain with elements from a custom collection.
        Parameters:
        initial - initial chain, may be empty, but not null.
        custom - collection of objects to be added to the initial chain, may be empty, but not null.
        Returns:
        merged chain.
        Throws:
        ChainException - when chain extension fails, e.g. when cyclic dependencies are discovered.