@Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof TransformedIterator<?, ?>)) {
            return false;
        }
        TransformedIterator<?, ?> that = (TransformedIterator<?, ?>) obj;
        return function.equals(that.function) && iterator.equals(that.iterator);
    }