public default boolean equals(final Step other, final boolean compareIds) {
        return (!compareIds || (other != null && this.getId().equals(other.getId()))) && this.equals(other);
    }
Compare the current step with another step.

@param other      the other step
@param compareIds whether to compare step IDs or not
@return true if the steps are equal, otherwise false
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Step.java