Class DetachedElement<E>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement<E>
-
- All Implemented Interfaces:
Serializable
,Element
,Attachable<E>
- Direct Known Subclasses:
DetachedEdge
,DetachedVertex
,DetachedVertexProperty
public abstract class DetachedElement<E> extends Object implements Element, Serializable, Attachable<E>
- Author:
- Stephen Mallette (http://stephen.genoprime.com), Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
Attachable.Exceptions, Attachable.Method
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Element
Element.Exceptions
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DetachedElement()
protected
DetachedElement(Object id, String label)
protected
DetachedElement(Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
E
get()
Get the raw object trying to be attached.Graph
graph()
Get the graph that this element is within.int
hashCode()
Object
id()
Gets the unique identifier for the graphElement
.String
label()
Gets the label for the graphElement
which helps categorize it.<V> Iterator<? extends Property<V>>
properties(String... propertyKeys)
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys.<V> Property<V>
property(String key)
Get aProperty
for theElement
given its key.<V> Property<V>
property(String key, V value)
Add or set a property value for theElement
given its key.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
attach
-
-
-
-
Method Detail
-
graph
public Graph graph()
Description copied from interface:Element
Get the graph that this element is within.
-
id
public Object id()
Description copied from interface:Element
Gets the unique identifier for the graphElement
.
-
label
public String label()
Description copied from interface:Element
Gets the label for the graphElement
which helps categorize it.
-
property
public <V> Property<V> property(String key, V value)
Description copied from interface:Element
Add or set a property value for theElement
given its key.
-
property
public <V> Property<V> property(String key)
Description copied from interface:Element
Get aProperty
for theElement
given its key. The default implementation calls the rawElement.properties(java.lang.String...)
.
-
properties
public <V> Iterator<? extends Property<V>> properties(String... propertyKeys)
Description copied from interface:Element
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys. If no keys are provide then return all the properties.- Specified by:
properties
in interfaceElement
-
get
public E get()
Description copied from interface:Attachable
Get the raw object trying to be attached.- Specified by:
get
in interfaceAttachable<E>
- Returns:
- the raw object to attach
-
-