@Override
    public int hashCode() {
        int result = vertexFilter != null ? vertexFilter.hashCode() : 0;
        result = 31 * result + (edgeFilter != null ? edgeFilter.hashCode() : 0);
        result = 31 * result + (vertexPropertyFilter != null ? vertexPropertyFilter.hashCode() : 0);
        return result;
    }
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