@Override
    public int hashCode() {
        int result = Objects.hash(super.hashCode(), direction, returnClass);
        // edgeLabel's order does not matter because in("x", "y") and in("y", "x") must be considered equal.
        if (edgeLabels != null && edgeLabels.length > 0) {
            final List<String> sortedEdgeLabels = Arrays.stream(edgeLabels)
                    .sorted(Comparator.nullsLast(Comparator.naturalOrder())).collect(Collectors.toList());
            for (final String edgeLabel : sortedEdgeLabels) {
                result = 31 * result + Objects.hashCode(edgeLabel);
            }
        }
        return result;
    }
Determines if the step returns edges.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexStep.java