E - the element typeID - the ID type of the element typepublic abstract class PgxCollection<E extends PgxEntity<ID>,ID> extends PgxManagedObject implements java.lang.Iterable<E>
| Modifier and Type | Method and Description |
|---|---|
void |
add(E entity)
Adds one element to this collection.
|
void |
addAll(java.util.Collection<E> source)
Blocking version of
addAllAsync(Collection). |
void |
addAll(E[] elements)
Blocking version of
addAllAsync(PgxEntity[]). |
abstract void |
addAll(ID... ids) |
PgxFuture<java.lang.Void> |
addAllAsync(java.util.Collection<E> source)
Add vertices/edges to an existing vertex/edge collection
|
PgxFuture<java.lang.Void> |
addAllAsync(E[] elements)
Add vertices/edges to an existing vertex/edge collection
|
void |
clear()
Blocking version of
clearAsync(). |
PgxFuture<java.lang.Void> |
clearAsync()
Clear an existing vertex/edge collection
|
PgxCollection<E,ID> |
clone() |
PgxCollection<E,ID> |
clone(java.lang.String newName)
Blocking version of
clone(String). |
PgxFuture<PgxCollection<E,ID>> |
cloneAsync()
Convenience method around
cloneAsync(String) passing name as nullClone an existing vertex/edge collection. |
PgxFuture<PgxCollection<E,ID>> |
cloneAsync(java.lang.String newName)
Clone an existing vertex/edge collection.
|
boolean |
contains(E element)
Blocking version of
containsAsync(PgxEntity). |
PgxFuture<java.lang.Boolean> |
containsAsync(E element)
Returns
true if this collection contains the specified element. |
CollectionType |
getCollectionType()
Gets the collection type.
|
EntityType |
getElementType()
Gets the element type.
|
PgxGraph |
getGraph()
Gets the graph.
|
abstract IdType |
getIdType()
Gets the ID type of the element type.
|
java.lang.String |
getName() |
boolean |
isMutable()
Blocking version of
isMutableAsync(). |
PgxFuture<java.lang.Boolean> |
isMutableAsync()
Checks whether an existing vertex/edge collection is mutable
|
java.util.Iterator<E> |
iterator()
Blocking version of
iteratorAsync(). |
PgxFuture<java.util.Iterator<E>> |
iteratorAsync()
Gets an Iterator over the collection.
|
void |
removeAll(java.util.Collection<E> source)
Blocking version of
removeAllAsync(Collection). |
abstract void |
removeAll(ID... ids) |
PgxFuture<java.lang.Void> |
removeAllAsync(java.util.Collection<E> source)
Remove vertices/edges from an existing vertex/edge collection
|
int |
size()
Blocking version of
sizeAsync(). |
PgxFuture<java.lang.Integer> |
sizeAsync()
Gets the number of elements in this collection
|
PgxCollection<E,ID> |
toMutable()
Blocking version of
toMutableAsync(). |
PgxCollection<E,ID> |
toMutable(java.lang.String newName)
Blocking version of
toMutableAsync(String). |
PgxFuture<PgxCollection<E,ID>> |
toMutableAsync()
Create a mutable copy of an existing vertex/edge collection
|
PgxFuture<PgxCollection<E,ID>> |
toMutableAsync(java.lang.String newName)
Create a mutable copy of an existing vertex/edge collection
|
java.lang.String |
toString() |
equals, hashCodeclose, destroy, destroyAsyncpublic void add(E entity)
entity - the entitypublic void addAll(java.util.Collection<E> source)
addAllAsync(Collection). Calls addAllAsync(Collection) and waits for the returned PgxFuture to complete.public void addAll(E[] elements)
addAllAsync(PgxEntity[]). Calls addAllAsync(PgxEntity[]) and waits for the returned PgxFuture to complete.public abstract void addAll(ID... ids) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic PgxFuture<java.lang.Void> addAllAsync(java.util.Collection<E> source)
source - vertices/edges to addpublic PgxFuture<java.lang.Void> addAllAsync(E[] elements)
elements - vertices/edges to addpublic void clear()
clearAsync(). Calls clearAsync() and waits for the returned PgxFuture to complete.public PgxFuture<java.lang.Void> clearAsync()
public PgxCollection<E,ID> clone()
clone in class java.lang.Objectpublic PgxCollection<E,ID> clone(java.lang.String newName) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
clone(String). Calls clone(String) and waits for the returned PgxFuture to complete.java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic PgxFuture<PgxCollection<E,ID>> cloneAsync()
cloneAsync(String) passing name as nullpublic PgxFuture<PgxCollection<E,ID>> cloneAsync(java.lang.String newName)
newName - name of the new collectionpublic boolean contains(E element)
containsAsync(PgxEntity). Calls containsAsync(PgxEntity) and waits for the returned PgxFuture to complete.public PgxFuture<java.lang.Boolean> containsAsync(E element)
true if this collection contains the specified element.element - element whose presence in this collection is to be testedtrue if this collection contains the specified elementpublic CollectionType getCollectionType()
public EntityType getElementType()
public PgxGraph getGraph()
public abstract IdType getIdType()
public java.lang.String getName()
getName in class PgxManagedObject
public boolean isMutable()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
isMutableAsync(). Calls isMutableAsync() and waits for the returned PgxFuture to complete.java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<java.lang.Boolean> isMutableAsync()
true if the collection is mutable, false if it is immutablepublic java.util.Iterator<E> iterator()
iteratorAsync(). Calls iteratorAsync() and waits for the returned PgxFuture to complete.public PgxFuture<java.util.Iterator<E>> iteratorAsync()
public void removeAll(java.util.Collection<E> source)
removeAllAsync(Collection). Calls removeAllAsync(Collection) and waits for the returned PgxFuture to complete.public abstract void removeAll(ID... ids) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic PgxFuture<java.lang.Void> removeAllAsync(java.util.Collection<E> source)
source - vertices/edges to removepublic int size()
sizeAsync(). Calls sizeAsync() and waits for the returned PgxFuture to complete.public PgxFuture<java.lang.Integer> sizeAsync()
public PgxCollection<E,ID> toMutable() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
toMutableAsync(). Calls toMutableAsync() and waits for the returned PgxFuture to complete.java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxCollection<E,ID> toMutable(java.lang.String newName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
toMutableAsync(String). Calls toMutableAsync(String) and waits for the returned PgxFuture to complete.java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<PgxCollection<E,ID>> toMutableAsync()
Convenience method around toMutableAsync(String) passing name as null
public PgxFuture<PgxCollection<E,ID>> toMutableAsync(java.lang.String newName)
newName - name of the new collectionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2016, 2018 Oracle and/or its affiliates. All Rights Reserved.