class Chain implements Iterable<T> {

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder();
        b.append("chain '").append(id).append("'{");
        boolean first = true;
        for (T component : components) {
            if (!first) {
                b.append("->");
            } else {
                first = false;
            }
            b.append(" ").append(component.getClass().getSimpleName()).append(" ");
        }
        b.append("}");
        return b.toString();
    }

    @SafeVarargs public  Chain(String id, T... components);
    public  Chain(String id, List<? extends T> components);

}