package st; import java.util.ArrayList; public abstract class AbstractInstance { protected String name; // the literal name of the declaration protected TypeEnum type; // the type of the declaration public AbstractInstance(String name, TypeEnum type) { this.type = type; this.name = name; } @Override public String toString() { return this.name; } @Override public abstract boolean equals(Object other); @Override public int hashCode() { return this.name.hashCode(); } public String getName() { return this.name; } public TypeEnum getType() { return this.type; } }