com.tinkerpop.gremlin.tinkergraph.structure.TinkerIndex Maven / Gradle / Ivy
The newest version!
package com.tinkerpop.gremlin.tinkergraph.structure;
import com.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.gremlin.structure.Graph;
import com.tinkerpop.gremlin.structure.Property;
import com.tinkerpop.gremlin.structure.Vertex;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
class TinkerIndex {
protected Map>> index = new ConcurrentHashMap<>();
protected final Class indexClass;
private final Set indexedKeys = new HashSet<>();
private final TinkerGraph graph;
public TinkerIndex(final TinkerGraph graph, final Class indexClass) {
this.graph = graph;
this.indexClass = indexClass;
}
protected void put(final String key, final Object value, final T element) {
Map