
com.github.moaxcp.graphs.greenrobot.DirectedEventGraph Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphs Show documentation
Show all versions of graphs Show documentation
dynamic graphs supporting streams and an EventBus
The newest version!
package com.github.moaxcp.graphs.greenrobot;
import com.github.moaxcp.graphs.*;
import com.github.moaxcp.graphs.events.DirectedGraphCreated;
import org.greenrobot.eventbus.EventBus;
public class DirectedEventGraph extends AbstractEventGraph {
public DirectedEventGraph(EventBus bus) {
super(bus);
getBus().post(new DirectedGraphCreated.Builder().build());
}
public DirectedEventGraph(ID id, EventBus bus) {
super(id, bus);
getBus().post(new DirectedGraphCreated.Builder().graphId(id).build());
}
@Override
protected EdgeKey newEdgeKey(ID from, ID to) {
return new DirectedEdgeKey<>(from, to);
}
@Override
public boolean isDirected() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy