From b03859dce5991169b07d1d5040c8faf7ba82e5b5 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Sat, 6 Apr 2024 19:02:21 -0600 Subject: Rewrite SymbolTable again P1 --- st/AbstractInstance.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'st/AbstractInstance.java') diff --git a/st/AbstractInstance.java b/st/AbstractInstance.java index a7dc8eb..65b0db7 100644 --- a/st/AbstractInstance.java +++ b/st/AbstractInstance.java @@ -10,25 +10,27 @@ public abstract class AbstractInstance { this.name = name; } - public abstract String toString(); + public String toString() { + return this.name; + } public boolean equals(AbstractInstance other) { - return this.name == other.get_name(); + return this.name == other.getName(); } public int hashCode() { return this.name.hashCode(); } - public String get_name() { + public String getName() { return this.name; } - public TypeEnum get_type() { + public TypeEnum getType() { return this.type; } - public int get_size() { + public int getSize() { return this.size; } -- cgit v1.2.3