T
- public abstract class LinkedListSecondary<T> extends java.lang.Object implements LinkedList<T>
Constructor and Description |
---|
LinkedListSecondary() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T entry)
Reports whether
this contains entry . |
boolean |
equals(java.lang.Object obj) |
int |
hashCode()
Note: Opted for a relatively more efficient implementation.
|
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 . |
java.lang.String |
toString() |
add, addToFront, advance, focus, insert, length, moveToFront, moveToRear, position, remove, retreat
clear, newInstance, transferFrom
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public T removeFront()
LinkedList
this
.removeFront
in interface LinkedList<T>
this
public T removeRear()
LinkedList
this
.removeRear
in interface LinkedList<T>
this
public boolean contains(T entry)
LinkedList
this
contains entry
.contains
in interface LinkedList<T>
entry
- entry to check for in this
this
contains entry
public void moveToPosition(int pos)
LinkedList
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.moveToPosition
in interface LinkedList<T>
pos
- position to which the focus
will shift