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

cdc.graphs.impl.GraphEdgeIngoingPredicate 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 ingoing edges of a node.
 *
 * @author Damien Carbonne
 *
 * @param  Node type.
 */
public final class GraphEdgeIngoingPredicate implements Predicate> {
    /** Reference node. */
    final N node;

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy