Interface Linked<T extends Linked<T>>

Type Parameters:
T - 值类型

public interface Linked<T extends Linked<T>>
An element that is linked on the Deque.
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the next element or null if either the element is unlinked or the last element on the deque.
    Retrieves the previous element or null if either the element is unlinked or the first element on the deque.
    void
    setNext(T next)
    Sets the next element or null if there is no link.
    void
    setPrevious(T prev)
    Sets the previous element or null if there is no link.
  • Method Details

    • getPrevious

      T getPrevious()
      Retrieves the previous element or null if either the element is unlinked or the first element on the deque.
      Returns:
      前一个值
    • setPrevious

      void setPrevious(T prev)
      Sets the previous element or null if there is no link.
      Parameters:
      prev - 前一个值
    • getNext

      T getNext()
      Retrieves the next element or null if either the element is unlinked or the last element on the deque.
      Returns:
      下一个值
    • setNext

      void setNext(T next)
      Sets the next element or null if there is no link.
      Parameters:
      next - 下一个值