public abstract class DetachedElement<E> extends Object implements Element, Serializable, Attachable<E>
Element.Exceptions
Modifier and Type | Field and Description |
---|---|
protected Object |
id |
protected String |
label |
protected Map<String,List<? extends Property>> |
properties |
Modifier | Constructor and Description |
---|---|
protected |
DetachedElement() |
protected |
DetachedElement(Element element) |
protected |
DetachedElement(Object id,
String label) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
Graph |
graph()
Get the graph that this element is within.
|
int |
hashCode() |
Object |
id()
Gets the unique identifier for the graph
Element . |
String |
label()
Gets the label for the graph
Element which helps categorize it. |
<V> Iterator<? extends Property<V>> |
properties(String... propertyKeys)
Get an
Iterator of properties. |
<V> Property<V> |
property(String key)
Get a
Property for the Element given its key. |
<V> Property<V> |
property(String key,
V value)
Add or set a property value for the
Element given its key. |
void |
remove()
Removes the
Element from the graph. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
attach, attach
protected DetachedElement()
protected DetachedElement(Element element)
public Graph graph()
Element
public Object id()
Element
Element
.public String label()
Element
Element
which helps categorize it.public <V> Property<V> property(String key, V value)
Element
Element
given its key.public <V> Property<V> property(String key)
Element
Property
for the Element
given its key.
The default implementation calls the raw Element.properties(java.lang.String...)
.public void remove()
Element
Element
from the graph.Copyright © 2013–2015 Apache Software Foundation. All rights reserved.