All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.moaxcp.graphs.greenrobot.DirectedEventGraph Maven / Gradle / Ivy

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