static final class Symbol { S text; Symbol master; *() {} *(S *text, bool dummy) {} // weird signature to prevent accidental calling bool isMaster() { ret master == this; } public int hashCode() { ret main.hashCode(master.text); } toString { ret text; } public bool equals(O o) { ret o instanceof Symbol && master == o/Symbol.master; } }