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

cdc.graphs.impl.tests.TestGraphHeavyNode Maven / Gradle / Ivy

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

import cdc.graphs.impl.BasicGraphHeavyNode;

/**
 * Implementation of graph heavy node for tests.
 *
 * @author Damien Carbonne
 */
public class TestGraphHeavyNode extends BasicGraphHeavyNode implements TestNode {
    private final String name;
    private String label;

    public TestGraphHeavyNode(String name) {
        this.name = name;
    }

    @Override
    public final String getName() {
        return name;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String toString() {
        return label == null ? name : name + " (" + label + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy