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

com.github.harbby.dsxparser.tree.Node Maven / Gradle / Ivy

The newest version!
package com.github.harbby.dsxparser.tree;

import java.util.List;
import java.util.Optional;

public abstract class Node {
    private final NodeLocation location;

    protected Node(NodeLocation location) {
        this.location = location;
    }

    public final Optional getLocation() {
        return Optional.ofNullable(location);
    }

    public abstract List getChildren();

    // Force subclasses to have a proper equals and hashcode implementation
    @Override
    public abstract int hashCode();

    @Override
    public abstract boolean equals(Object obj);

    @Override
    public abstract String toString();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy