Interface LinkReference<T>

All Superinterfaces:
Iterable<T>, LinkingReference<T>, LinkingReferencing<T>, Reference<T>, Referencing<T>
All Known Implementing Classes:
LinkReference.Default

public interface LinkReference<T>
extends LinkingReference<T>
  • Method Details

    • next

      LinkReference<T> next()
      Specified by:
      next in interface LinkingReference<T>
      Specified by:
      next in interface LinkingReferencing<T>
    • setNext

      LinkReference<T> setNext​(LinkReference<T> linkedReference)
      Sets linkedReference as this LinkedReference object's linked LinkedReference object.

      Note that the so far linked LinkedReference object is returned, not this object itself!

      Parameters:
      linkedReference - the new linked reference
      Returns:
      the so far linked LinkedReference object (NOT this!)
    • link

      LinkReference<T> link​(LinkReference<T> linkedReference)
      Sets linkedReference as this LinkedReference object's linked LinkedReference object.

      Note that the reference is returned, not this object itself!

      Parameters:
      linkedReference - the new linked reference
      Returns:
      the linked LinkedReference object (NOT this!)
    • link

      LinkReference<T> link​(T nextRef)
      Alias for link(new LinkedReference(nextRef)).
      Parameters:
      nextRef - the object for the new linked reference
      Returns:
      the linked LinkedReference object (NOT this!)
    • insert

      LinkReference<T> insert​(LinkReference<T> linkedReference)
    • removeNext

      LinkReference<T> removeNext()
    • New

      @SafeVarargs static <T> LinkReference<T> New​(T... objects)