public void close() { if (iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } }
public IndexElementsPipe(final Index<E> index, final String key, final Object value) { super.setStarts(index.get(key, value).iterator()); } }
/** * Add a vertex to a graph only if no other vertex in the provided Index is indexed by the property key/value pair. * If a vertex already exists with that key/value pair, return the pre-existing vertex. * * @param graph the graph to add the vertex to * @param id the id of the vertex to create (can be null) * @param index the index to determine if another vertex with the same key/value exists * @param uniqueKey the key to check on for uniqueness of the vertex * @param uniqueValue the value to check on for uniqueness of the vertex * @return the newly created vertex or the vertex that satisfies the uniqueness criteria */ public static Vertex addUniqueVertex(final IndexableGraph graph, final Object id, final Index<Vertex> index, final String uniqueKey, final Object uniqueValue) { final Iterator<Vertex> results = index.get(uniqueKey, uniqueValue).iterator(); if (results.hasNext()) { return results.next(); } else { final Vertex vertex = graph.addVertex(id); vertex.setProperty(uniqueKey, uniqueValue); return vertex; } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } } }
@Override public void close() { if (rawIterable instanceof CloseableIterable) { ((CloseableIterable) rawIterable).close(); } }
@Override public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable<Edge>) this.iterable).close(); } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } } }
public void close() { if (iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) this.iterable).close(); } }
public void close() { if (iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } }
public void close() { if (this.iterable instanceof CloseableIterable) { ((CloseableIterable) iterable).close(); } } }
@Override public void close() { for (Iterable<S> itty : iterables) { if (itty instanceof CloseableIterable) { ((CloseableIterable<S>) itty).close(); } } } }
@Override public void close() { if (iterable instanceof CloseableIterable) { ((CloseableIterable<Vertex>) iterable).close(); } }