public interface Pipeline<T>
extends java.lang.Iterable<T>
| 限定符和类型 | 方法和说明 |
|---|---|
Pipeline<T> |
addFirst(T element)
Add the element to the first.
|
Pipeline<T> |
addLast(T element)
Add the element to the last.
|
void |
clear()
Clear all elements.
|
boolean |
contains(java.lang.Object o) |
void |
copy(Pipeline<T> pipeline)
Copy all the contents of another pipe to this pipe.
|
java.util.ListIterator<T> |
iterator() |
void |
remove(T element)
Remove an element.
|
Pipeline<T> |
setAfter(T target,
T element)
This method will make sure the element is after the target.
|
Pipeline<T> |
setBefore(T target,
T element)
This method will make sure the element is before the target.
|
int |
size() |
Pipeline<T> addLast(T element)
element - the elementPipeline<T> addFirst(T element)
element - the elementPipeline<T> setAfter(T target, T element)
If pipe doesn't contain this element, the element will be add into pipe.
If there are multiple targets in the pipe, make sure to put the element after all of them.
target - The target element.element - The element might be moved.Pipeline<T> setBefore(T target, T element)
If pipe doesn't contain this element, the element will be add into pipe.
If there are multiple targets in the pipe, make sure to put the element before all of them.
target - The target element.element - The element might be moved.void remove(T element)
element - void clear()
int size()
boolean contains(java.lang.Object o)
void copy(Pipeline<T> pipeline)
pipeline - Another pipe which will be copied.