|
Parallel Colt 0.7.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
cern.colt.list.tlong.LongListAdapter
public class LongListAdapter
Adapter that permits an AbstractLongList to be
viewed and treated as a JDK 1.2 AbstractList. Makes the
contained list compatible with the JDK 1.2 Collections Framework.
Any attempt to pass elements other than java.lang.Number to setter methods will throw a java.lang.ClassCastException. java.lang.Number.longValue() is used to convert objects into primitive values which are then stored in the backing templated list. Getter methods return java.lang.Long objects.
| Constructor Summary | |
|---|---|
LongListAdapter(AbstractLongList content)
Constructs a list backed by the specified content list. |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list (optional operation). |
Object |
get(int index)
Returns the element at the specified position in this list. |
Object |
remove(int index)
Removes the element at the specified position in this list (optional operation). |
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the specified element (optional operation). |
int |
size()
Returns the number of elements in this list. |
| Methods inherited from class java.util.AbstractList |
|---|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
| Constructor Detail |
|---|
public LongListAdapter(AbstractLongList content)
| Method Detail |
|---|
public void add(int index,
Object element)
add in interface Listadd in class AbstractListindex - index at which the specified element is to be inserted.element - element to be inserted.
ClassCastException - if the class of the specified element prevents it from being
added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from
being added to this list.
IndexOutOfBoundsException - index is out of range (index <
0 || index > size()).public Object get(int index)
get in interface Listget in class AbstractListindex - index of element to return.
IndexOutOfBoundsException - if the given index is out of range (
index < 0 || index >= size()).public Object remove(int index)
remove in interface Listremove in class AbstractListindex - the index of the element to remove.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index >= size()).
public Object set(int index,
Object element)
set in interface Listset in class AbstractListindex - index of element to replace.element - element to be stored at the specified position.
ClassCastException - if the class of the specified element prevents it from being
added to this list.
IllegalArgumentException - if some aspect of the specified element prevents it from
being added to this list.
IndexOutOfBoundsException - if the specified index is out of range (
index < 0 || index >= size()).public int size()
size in interface Collectionsize in interface Listsize in class AbstractCollection
|
Parallel Colt 0.7.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||