|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcern.colt.PersistentObject
cern.colt.list.AbstractCollection
cern.colt.list.AbstractList
cern.colt.list.AbstractIntList
infovis.utils.IntLinkedList
public class IntLinkedList
Class IntLinkedList
| Field Summary |
|---|
| Fields inherited from class cern.colt.PersistentObject |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
IntLinkedList()
|
|
| Method Summary | |
|---|---|
void |
add(int o)
Appends the specified element to the end of this list. |
void |
add(int index,
int element)
Inserts the specified element at the specified position in this list. |
boolean |
addAll(AbstractIntList c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. |
boolean |
addAll(int index,
AbstractIntList c)
Inserts all of the elements in the specified collection into this list, starting at the specified position. |
void |
addFirst(int o)
Inserts the given element at the beginning of this list. |
void |
addLast(int o)
Appends the given element to the end of this list. |
void |
clear()
Removes all of the elements from this list. |
boolean |
contains(int o)
Returns true if this list contains the specified element. |
void |
delete(int o)
Removes the first occurrence of the specified element in this list. |
void |
ensureCapacity(int minCapacity)
|
int |
get(int index)
Returns the element at the specified position in this list. |
int |
getFirst()
Returns the first element in this list. |
int |
getLast()
Returns the last element in this list. |
int |
getQuick(int index)
|
int |
indexOf(int o)
Returns the index in this list of the first occurrence of the specified element, or -1 if the List does not contain this element. |
int |
lastIndexOf(int o)
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element. |
RowIterator |
listIterator(int index)
Returns a list-iterator of the elements in this list (in proper sequence), starting at the specified position in the list. |
int |
removeAt(int index)
Removes the element at the specified position in this list. |
int |
removeFirst()
Removes and returns the first element from this list. |
int |
removeLast()
Removes and returns the last element from this list. |
void |
set(int index,
int element)
Replaces the element at the specified position in this list with the specified element. |
void |
setQuick(int index,
int element)
|
int |
size()
Returns the number of elements in this list. |
| Methods inherited from class cern.colt.list.AbstractIntList |
|---|
addAllOf, addAllOfFromTo, beforeInsert, beforeInsertAllOfFromTo, binarySearch, binarySearchFromTo, clone, elements, elements, equals, fillFromToWith, forEach, indexOfFromTo, lastIndexOfFromTo, mergeSortFromTo, mergeSortFromTo, partFromTo, quickSortFromTo, quickSortFromTo, removeAll, removeFromTo, replaceFromToWithFrom, replaceFromToWithFromTo, replaceFromWith, retainAll, reverse, shuffleFromTo, times, toList, toString |
| Methods inherited from class cern.colt.list.AbstractList |
|---|
addAllOf, beforeInsertAllOf, mergeSort, quickSort, remove, setSize, shuffle, sort, sortFromTo, trimToSize |
| Methods inherited from class cern.colt.list.AbstractCollection |
|---|
isEmpty |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntLinkedList()
| Method Detail |
|---|
public void ensureCapacity(int minCapacity)
ensureCapacity in class AbstractIntListpublic int getQuick(int index)
getQuick in class AbstractIntList
public void setQuick(int index,
int element)
setQuick in class AbstractIntListpublic int getFirst()
NoSuchElementException - if this list is empty.public int getLast()
NoSuchElementException - if this list is empty.public int removeFirst()
NoSuchElementException - if this list is empty.public int removeLast()
NoSuchElementException - if this list is empty.public void addFirst(int o)
o - the element to be inserted at the beginning of this list.public void addLast(int o)
o - the element to be inserted at the end of this list.public boolean contains(int o)
contains in class AbstractIntListo - element whose presence in this list is to be tested.
public int size()
size in class AbstractIntListpublic void add(int o)
add in class AbstractIntListo - element to be appended to this list.public void delete(int o)
delete in class AbstractIntListo - element to be removed from this list, if present.public boolean addAll(AbstractIntList c)
c - the elements to be inserted into this list.
NullPointerException - if the specified collection is null.
public boolean addAll(int index,
AbstractIntList c)
index - index at which to insert first element from the specified
collection.c - elements to be inserted into this list.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index > size()).
NullPointerException - if the specified collection is null.public void clear()
clear in class AbstractListpublic int get(int index)
get in class AbstractIntListindex - index of element to return.
IndexOutOfBoundsException - if the specified index is is out of range (
index < 0 || index >= size()).
public void set(int index,
int element)
set in class AbstractIntListindex - index of element to replace.element - element to be stored at the specified position.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index >= size()).
public void add(int index,
int element)
index - index at which the specified element is to be inserted.element - element to be inserted.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index > size()).public int removeAt(int index)
index - the index of the element to removed.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index >= size()).public int indexOf(int o)
indexOf in class AbstractIntListo - element to search for.
public int lastIndexOf(int o)
lastIndexOf in class AbstractIntListo - element to search for.
public RowIterator listIterator(int index)
The list-iterator is fail-fast : if the list is structurally modified at any time after the Iterator is created, in any way except through the list-iterator's own remove or add methods, the list-iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
index - index of first element to be returned from the list-iterator
(by a call to next).
IndexOutOfBoundsException - if index is out of range (
index < 0 || index > size()).List.listIterator(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||