public default boolean isSimple() {
        final List<Object> objects = this.objects();
        for (int i = 0; i < objects.size() - 1; i++) {
            for (int j = i + 1; j < objects.size(); j++) {
                if (Objects.equals(objects.get(i), objects.get(j)))
                    return false;
            }
        }
        return true;
    }
Determines whether the path is a simple or not. A simple path has no cycles and thus, no repeated objects.

@return Whether the path is simple or not
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java