public static Map<String, List<VertexProperty>> vertexPropertyMap(final Vertex vertex, final String... propertyKeys) {
        final Map<String, List<VertexProperty>> propertyMap = new HashMap<>();
        vertex.properties(propertyKeys).forEachRemaining(property -> {
            if (propertyMap.containsKey(property.key()))
                propertyMap.get(property.key()).add(property);
            else {
                final List<VertexProperty> list = new ArrayList<>();
                list.add(property);
                propertyMap.put(property.key(), list);
            }
        });
        return propertyMap;
    }
A standard method for determining if two {@link Property} objects are equal. This method should be used by any
{@link Object#equals(Object)} implementation to ensure consistent behavior.

@param a the first {@link Property}
@param b the second {@link Property}
@return true if equal and false otherwise
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java