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

cdc.graphs.impl.BasicSuperLightGraph Maven / Gradle / Ivy

There is a newer version: 0.71.2
Show newest version
package cdc.graphs.impl;

public class BasicSuperLightGraph extends BasicLightGraph> {
    public BasicSuperLightGraph(boolean sorted,
                                CollectionKind collectionKind) {
        super(sorted, collectionKind);
    }

    public BasicSuperLightGraph() {
        super();
    }

    public BasicGraphEdge addEdge(N source,
                                     N target) {
        final BasicGraphEdge edge = new BasicGraphEdge<>(source, target);
        addEdge(edge);
        return edge;
    }

    public void addEdgeIfMissing(N source,
                                 N target) {
        if (!hasEdge(source, target)) {
            addEdge(source, target);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy