public abstract class DetachedElement<E> extends java.lang.Object implements Element, Element.Iterators, java.io.Serializable, Attachable<E>
Element.Exceptions, Element.Iterators| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
id |
protected java.lang.String |
label |
protected java.util.Map<java.lang.String,java.util.List<? extends Property>> |
properties |
| Modifier | Constructor and Description |
|---|---|
protected |
DetachedElement() |
protected |
DetachedElement(Element element) |
protected |
DetachedElement(java.lang.Object id,
java.lang.String label) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
Graph |
graph()
Get the graph that this element is within.
|
int |
hashCode() |
java.lang.Object |
id()
Gets the unique identifier for the graph
Element. |
Element.Iterators |
iterators()
Gets the iterators for the
Element. |
java.lang.String |
label()
Gets the label for the graph
Element which helps categorize it. |
<V> Property<V> |
property(java.lang.String key)
Get a
Property for the Element given its key. |
<V> Property<V> |
property(java.lang.String key,
V value)
Add or set a property value for the
Element given its key. |
<V> java.util.Iterator<? extends Property<V>> |
propertyIterator(java.lang.String... propertyKeys)
Get an
Iterator of properties. |
void |
remove()
Removes the
Element from the graph. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitvalueIteratorattach, attachprotected java.lang.Object id
protected java.lang.String label
protected java.util.Map<java.lang.String,java.util.List<? extends Property>> properties
protected DetachedElement()
protected DetachedElement(Element element)
protected DetachedElement(java.lang.Object id,
java.lang.String label)
public Graph graph()
Elementpublic java.lang.Object id()
ElementElement.public java.lang.String label()
ElementElement which helps categorize it.public <V> Property<V> property(java.lang.String key, V value)
ElementElement given its key.public <V> Property<V> property(java.lang.String key)
ElementProperty for the Element given its key.
The default implementation calls the raw Element#iterators#propertyIterator.public void remove()
ElementElement from the graph.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic Element.Iterators iterators()
ElementElement. Iterators provide low-level access to the data associated with
an Element as they do not come with the overhead of Traversal
construction. Use iterators in places where performance is most crucial.public <V> java.util.Iterator<? extends Property<V>> propertyIterator(java.lang.String... propertyKeys)
Element.IteratorsIterator of properties.propertyIterator in interface Element.IteratorsCopyright © 2013-2015 TinkerPop. All Rights Reserved.