Class DependencyChain<T>

java.lang.Object
overit.geocall.util.DependencyChain<T>

public class DependencyChain<T> extends Object
Simple implementation of a list that allows you to define dependency constraints between the various elements using the DependencyChain.Item.isAfter(DependencyChain.Item) and DependencyChain.Item.isBefore(DependencyChain.Item) methods. Once the constraints have been defined, it allows you to obtain a list whose order of the elements respects the assigned constraints.

 DependencyChain<String> chain = new DependencyChain<>();
 Item<String> i2 = chain.add("second");
 Item<String> i1 = chain.add("first");
 i1.isBefore(i2);
 List<String> orderedList = chain.sort();