package com.graphtest.model;

import java.util.Objects;

public class Node {
    private final String className;
    private final String filePath;
    private NodeStatus status;

    public Node(String className, String filePath) {
        this.className = className;
        this.filePath = filePath;
        this.status = NodeStatus.OK;
    }

    public Node(String className, String filePath, NodeStatus status) {
        this.className = className;
        this.filePath = filePath;
        this.status = status;
    }

    public String getClassName() { return className; }
    public String getFilePath() { return filePath; }
    public NodeStatus getStatus() { return status; }
    public void setStatus(NodeStatus status) { this.status = status; }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Node)) return false;
        Node node = (Node) o;
        return Objects.equals(className, node.className);
    }

    @Override
    public int hashCode() { return Objects.hash(className); }

    @Override
    public String toString() {
        return "Node{" + className + ", status=" + status + "}";
    }
}
