public default <A> A head() {
        return (A) this.objects().get(this.size() - 1);
    }
Get the head of the path.

@param <A> the type of the head of the path
@return the head of the path
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java