diff options
Diffstat (limited to 'st/AbstractInstance.java')
-rw-r--r-- | st/AbstractInstance.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/st/AbstractInstance.java b/st/AbstractInstance.java index cdeef8e..a7052a1 100644 --- a/st/AbstractInstance.java +++ b/st/AbstractInstance.java @@ -5,7 +5,6 @@ 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 - protected ClassInstance cls; // the surrounding class public AbstractInstance(String name, TypeEnum type) { this.type = type; @@ -16,18 +15,12 @@ public abstract class AbstractInstance { return this.name; } - public boolean equals(AbstractInstance other) { - return this.name == other.getName() && - this.type == this.type; - } + @Override public abstract boolean equals(Object other); @Override public int hashCode() { return this.name.hashCode(); } - public void addClassInstance(ClassInstance cls) { - this.cls = cls; - } public String getName() { return this.name; @@ -37,8 +30,4 @@ public abstract class AbstractInstance { return this.type; } - public ClassInstance getClassInstance() { - return this.cls; - } - } |