@Override
    // N.B. equality only depends on value, not distance
    public boolean equals(Object obj) {
        if (obj == null || this.getClass() != obj.getClass()) {
            return false;
        }
        final Word other = (Word) obj;
        if (this.getValue().equals(other.getValue())) {
            return true;
        }
        return false;
    }