Interface Attachable<V>
-
- All Known Subinterfaces:
RemoteTraverser<T>
,Traverser.Admin<T>
- All Known Implementing Classes:
AbstractRemoteTraverser
,AbstractTraverser
,B_LP_NL_O_P_S_SE_SL_Traverser
,B_LP_NL_O_S_SE_SL_Traverser
,B_LP_O_P_S_SE_SL_Traverser
,B_LP_O_S_SE_SL_Traverser
,B_NL_O_S_SE_SL_Traverser
,B_O_S_SE_SL_Traverser
,B_O_Traverser
,DefaultRemoteTraverser
,DetachedEdge
,DetachedElement
,DetachedPath
,DetachedProperty
,DetachedVertex
,DetachedVertexProperty
,DummyTraverser
,EmptyTraverser
,LP_NL_O_OB_P_S_SE_SL_Traverser
,LP_NL_O_OB_S_SE_SL_Traverser
,LP_O_OB_P_S_SE_SL_Traverser
,LP_O_OB_S_SE_SL_Traverser
,NL_O_OB_S_SE_SL_Traverser
,O_OB_S_SE_SL_Traverser
,O_Traverser
,ProjectedTraverser
,ReferenceEdge
,ReferenceElement
,ReferencePath
,ReferenceProperty
,ReferenceVertex
,ReferenceVertexProperty
,StarGraph.StarEdge
,StarGraph.StarElement
,StarGraph.StarInEdge
,StarGraph.StarOutEdge
,StarGraph.StarProperty
,StarGraph.StarVertex
,StarGraph.StarVertexProperty
public interface Attachable<V>
An interface that provides methods for detached properties and elements to be re-attached to theGraph
. There are two general ways in which they can be attached:Attachable.Method.get(org.apache.tinkerpop.gremlin.structure.util.Host)
orAttachable.Method.create(org.apache.tinkerpop.gremlin.structure.util.Host)
. AAttachable.Method.get(org.apache.tinkerpop.gremlin.structure.util.Host)
will find the property/element at the host location and return it. AAttachable.Method.create(org.apache.tinkerpop.gremlin.structure.util.Host)
will create the property/element at the host location and return it.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Attachable.Exceptions
static class
Attachable.Method
A collection of general methods of attachment.
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
logger
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default V
attach(Function<Attachable<V>,V> method)
Provide a way to attach anAttachable
implementation to a host.V
get()
Get the raw object trying to be attached.
-
-
-
Method Detail
-
get
V get()
Get the raw object trying to be attached.- Returns:
- the raw object to attach
-
attach
default V attach(Function<Attachable<V>,V> method) throws IllegalStateException
Provide a way to attach anAttachable
implementation to a host. Note that the context of the host is not defined by way of the attachment method itself that is supplied as an argument. It is up to the implementer to supply that context.- Parameters:
method
- aFunction
that takes anAttachable
and returns the "re-attached" object- Returns:
- the return value of the
method
- Throws:
IllegalStateException
- if theAttachable
is not a "graph" object (i.e. host or attachable don't work together)
-
-