@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GraphFilter that = (GraphFilter) o;

        if (!Objects.equals(vertexFilter, that.vertexFilter)) return false;
        if (!Objects.equals(edgeFilter, that.edgeFilter)) return false;
        return Objects.equals(vertexPropertyFilter, that.vertexPropertyFilter);
    }
Get the legality of a particular edge direction.

@param direction the direction of the edge.
@return the {@link Legal} of the edge direction.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphFilter.java