class RankEntity<T> {
    public final T target;
    public final int index;

    public RankEntity(T t, int i) {
        target = t;
        index = i;
    }

    @Override
    public boolean equals(Object o) {<FILL_FUNCTION_BODY>}

    @Override
    public int hashCode() {
        return Objects.hash(target);
    }
}

        if (this == o) return true;
        if (!(o instanceof RankEntity)) return false;
        RankEntity that = (RankEntity) o;
        return Objects.equals(target, that.target);
    
<no_super_class>