public synchronized void add(BasicSubsystem parent, BasicSubsystem child) {
SubsystemWrapper parentWrap = new SubsystemWrapper(parent);
SubsystemWrapper childWrap = new SubsystemWrapper(child);
if (containsAncestor(childWrap, parentWrap))
throw new SubsystemException("Cycle detected between '" + parentWrap + "' and '" + childWrap + "'");
Collection<SubsystemWrapper> subsystems = adjacencyList.get(childWrap);
if (subsystems == null) {
subsystems = new HashSet<SubsystemWrapper>();
adjacencyList.put(childWrap, subsystems);
}