Package org.miaixz.bus.core.center.queue
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 TypeMethodDescriptiongetNext()Retrieves the next element ornullif either the element is unlinked or the last element on the deque.Retrieves the previous element ornullif either the element is unlinked or the first element on the deque.voidSets the next element ornullif there is no link.voidsetPrevious(T prev) Sets the previous element ornullif there is no link.
-
Method Details
-
getPrevious
T getPrevious()Retrieves the previous element ornullif either the element is unlinked or the first element on the deque.- Returns:
- 前一个值
-
setPrevious
Sets the previous element ornullif there is no link.- Parameters:
prev- 前一个值
-
getNext
T getNext()Retrieves the next element ornullif either the element is unlinked or the last element on the deque.- Returns:
- 下一个值
-
setNext
Sets the next element ornullif there is no link.- Parameters:
next- 下一个值
-