ListenableGraph<LengthData> graph = new ListenableGraph<>( new MultimapGraph<LengthData>()); graph.getEventAPI().addListener(history, EventTypes.values()); graph.getEventAPI().addListener(new GraphModificationChecker());
/** * Decorates the specified graph such that all modifications are monitored. * See {@link ListenableGraph} for more information. * @param delegateGraph The graph to decorate. */ public ListenableGraph(Graph<E> delegateGraph) { super(delegateGraph); eventDispatcher = new EventDispatcher(EventTypes.values()); }
/** * Decorates the specified graph such that all modifications are monitored. * See {@link ListenableGraph} for more information. * @param delegateGraph The graph to decorate. */ public ListenableGraph(Graph<E> delegateGraph) { super(delegateGraph); eventDispatcher = new EventDispatcher(EventTypes.values()); }