T
- public interface LinkedList<T> extends LinkedListKernel<T>, java.lang.Iterable<T>
LinkedListKernel
interface. All method implementations must, by
design, use only the LinkedListKernel methods to perform operations on the
component.Modifier and Type | Method and Description |
---|---|
boolean |
contains(T entry)
Reports whether
this contains entry . |
void |
moveToPosition(int pos)
Shifts
this.focus to the (pos + 1)th entry in
this . |
T |
removeFront()
Removes and returns the first entry in
this . |
T |
removeRear()
Removes and returns the final entry in
this . |
add, addToFront, advance, focus, insert, length, moveToFront, moveToRear, position, remove, retreat
clear, newInstance, transferFrom
T removeFront()
this
.this
removeFront = [the first entry of #this] and this = [#this / front]
T removeRear()
this
.this
removeFront = [the final entry of #this] and this = #this / rear
boolean contains(T entry)
this
contains entry
.entry
- entry to check for in this
this
contains entry
void moveToPosition(int pos)
this.focus
to the (pos
+ 1)th entry in
this
. A linked list has no index value, but this can be
essentially thought of as a tool for index value in the most simple
terms.pos
- position to which the focus
will shiftpos < this.length and pos >= 0