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

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

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

import java.util.function.Predicate;

import cdc.graphs.GraphEdge;

/**
 * Edge predicate for outgoing edges of a node.
 *
 * @author Damien Carbonne
 *
 * @param  Node type.
 */
public final class GraphEdgeOutgoingPredicate implements Predicate> {
    /** Reference node. */
    final N node;

    public GraphEdgeOutgoingPredicate(N node) {
        this.node = node;
    }

    @Override
    public boolean test(GraphEdge edge) {
        return edge.getSource() == node;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy