public interface Attachable<V>
Graph.
There are two general ways in which they can be attached: Attachable.Method.get(org.apache.tinkerpop.gremlin.structure.util.Host) or Attachable.Method.create(org.apache.tinkerpop.gremlin.structure.util.Host).
A Attachable.Method.get(org.apache.tinkerpop.gremlin.structure.util.Host) will find the property/element at the host location and return it.
A Attachable.Method.create(org.apache.tinkerpop.gremlin.structure.util.Host) will create the property/element at the host location and return it.| Modifier and Type | Interface and Description |
|---|---|
static class |
Attachable.Exceptions |
static class |
Attachable.Method
A collection of general methods of attachment.
|
| Modifier and Type | Method and Description |
|---|---|
default V |
attach(Function<Attachable<V>,V> method)
Provide a way to attach an
Attachable implementation to a host. |
V |
get()
Get the raw object trying to be attached.
|
V get()
default V attach(Function<Attachable<V>,V> method) throws IllegalStateException
Attachable 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.method - a Function that takes an Attachable and returns the "re-attached" objectmethodIllegalStateException - if the Attachable is not a "graph" object (i.e. host or
attachable don't work together)Copyright © 2013–2016 Apache Software Foundation. All rights reserved.