Interface Attachable<V>

    • 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 an 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.
        Parameters:
        method - a Function that takes an Attachable and returns the "re-attached" object
        Returns:
        the return value of the method
        Throws:
        IllegalStateException - if the Attachable is not a "graph" object (i.e. host or attachable don't work together)