@Override public final int hashCode() { if (hv == 0) { hv = pos ^ source.hashCode() ^ symbol.hashCode(); } return hv; }
@Override public final boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Occurrence)) return false; Occurrence t = (Occurrence) o; if (source != t.source) return false; if (pos != t.pos) return false; if (symbol == t.symbol) return true; else { if (symbol == null) return false; return symbol.equals(t); } }
@Override public String toString() { return symbol.toString() + "@" + pos; }