public class ExposedNodeLinkedList
extends java.lang.Object
implements java.util.List
LinkedNode
Constructor and Description |
---|
ExposedNodeLinkedList()
Constructs an empty list.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object object) |
boolean |
add(java.lang.Object object) |
boolean |
addAll(java.util.Collection collection) |
boolean |
addAll(int index,
java.util.Collection collection) |
LinkedNode |
addFirst(java.lang.Object o)
Inserts the given contents at the beginning of this list.
|
LinkedNode |
addLast(java.lang.Object o)
Appends the given contents to the end of this list.
|
void |
clear()
Removes all of the contents from this list.
|
boolean |
contains(java.lang.Object o)
Returns true if this list contains the specified contents.
|
boolean |
containsAll(java.util.Collection collection) |
java.lang.Object |
get(int index) |
java.lang.Object |
getFirst()
Returns the first contents in this list.
|
java.lang.Object |
getLast()
Returns the last contents in this list.
|
int |
indexOf(java.lang.Object o)
Returns the index in this list of the first occurrence of the
specified contents, or -1 if the List does not contain this
contents.
|
boolean |
isEmpty() |
java.util.Iterator |
iterator() |
int |
lastIndexOf(java.lang.Object object) |
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
void |
moveFirst(LinkedNode node)
Allows a node to be efficiently moved first.
|
java.lang.Object |
remove(int index) |
void |
remove(LinkedNode n)
Allows a node to be efficiently removed.
|
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection collection) |
java.lang.Object |
removeFirst()
Removes and returns the first contents from this list.
|
java.lang.Object |
removeLast()
Removes and returns the last contents from this list.
|
boolean |
retainAll(java.util.Collection collection) |
java.lang.Object |
set(int index,
java.lang.Object value) |
int |
size()
Returns the number of contents in this list.
|
java.util.List |
subList(int start,
int end) |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] array) |
public java.lang.Object[] toArray(java.lang.Object[] array)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
public java.lang.Object set(int index, java.lang.Object value)
set
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
public java.util.List subList(int start, int end)
subList
in interface java.util.List
public boolean retainAll(java.util.Collection collection)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
public boolean removeAll(java.util.Collection collection)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
public boolean containsAll(java.util.Collection collection)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
public boolean addAll(java.util.Collection collection)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
public boolean addAll(int index, java.util.Collection collection)
addAll
in interface java.util.List
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection
remove
in interface java.util.List
public boolean add(java.lang.Object object)
add
in interface java.util.Collection
add
in interface java.util.List
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List
public void add(int index, java.lang.Object object)
add
in interface java.util.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
public java.lang.Object getFirst()
public java.lang.Object getLast()
public java.lang.Object removeFirst()
java.util.NoSuchElementException
- if this list is empty.public java.lang.Object removeLast()
java.util.NoSuchElementException
- if this list is empty.public LinkedNode addFirst(java.lang.Object o)
o
- the contents to be inserted at the beginning of this list.public LinkedNode addLast(java.lang.Object o)
o
- the contents to be inserted at the end of this list.public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
o
- contents whose presence in this list is to be tested.public int size()
size
in interface java.util.Collection
size
in interface java.util.List
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
o
- contents to search for.public void remove(LinkedNode n)
public void moveFirst(LinkedNode node)
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference