|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.AbstractLongCollection bak.pcj.list.AbstractLongList
This class represents an abstract base for implementing lists of long values. All operations that can be implemented using iterators and the get() and set() methods are implemented as such. In most cases, this is hardly an efficient solution, and at least some of those methods should be overridden by sub-classes.
Constructor Summary | |
protected |
AbstractLongList()
Default constructor to be invoked by sub-classes. |
Method Summary | |
void |
add(int index,
long v)
Throws UnsupportedOperationException. |
boolean |
add(long v)
Adds an element to this collection. |
boolean |
addAll(int index,
LongCollection c)
Adds all the elements of a specified collection to this list starting at a specified index. |
boolean |
equals(Object obj)
Indicates whether this collection is equal to some object. |
int |
hashCode()
Returns a hash code value for this collection. |
int |
indexOf(int index,
long c)
Returns the index of the first occurance of a specified element in this list after or at a specified index. |
int |
indexOf(long c)
Returns the index of the first occurance of a specified element in this list. |
LongIterator |
iterator()
Returns an iterator over this collection. |
int |
lastIndexOf(int index,
long c)
Returns the index of the last occurance of a specified element in this list before a specified index. |
int |
lastIndexOf(long c)
Returns the index of the last occurance of a specified element in this list. |
LongListIterator |
listIterator()
Returns a list iterator over this list. |
LongListIterator |
listIterator(int index)
Returns a list iterator over this list, starting from a specified index. |
long |
removeElementAt(int index)
Throws UnsupportedOperationException. |
Methods inherited from class bak.pcj.AbstractLongCollection |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString, trimToSize |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bak.pcj.list.LongList |
get, set |
Methods inherited from interface bak.pcj.LongCollection |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, trimToSize |
Constructor Detail |
protected AbstractLongList()
Method Detail |
public boolean add(long v)
LongCollection
add
in interface LongCollection
add
in class AbstractLongCollection
public void add(int index, long v)
add
in interface LongList
index
- the index at which to add the element. If
index == size() the element is appended
to this list.v
- the long value to add to this list.
UnsupportedOperationException
- unconditionally.LongCollection.add(long)
,
LongCollection.addAll(LongCollection)
,
LongList.addAll(int,LongCollection)
public boolean addAll(int index, LongCollection c)
LongList
addAll
in interface LongList
index
- the index at which to insert the elements of
the specified collection. If
index == size() the elements are appended
to this list.c
- the collection whose elements to add to this
list.
LongCollection.add(long)
,
LongList.add(int, long)
,
LongCollection.addAll(LongCollection)
public int indexOf(long c)
LongList
indexOf
in interface LongList
c
- the element to find.
public int indexOf(int index, long c)
LongList
indexOf
in interface LongList
c
- the element to find.index
- the index at which to start the search.
public LongIterator iterator()
LongCollection
iterator
in interface LongCollection
public int lastIndexOf(long c)
LongList
lastIndexOf
in interface LongList
c
- the element to find.
public int lastIndexOf(int index, long c)
LongList
lastIndexOf
in interface LongList
c
- the element to find.index
- the index at which to start the search. Note that
the element at index
is not included
in the search.
public LongListIterator listIterator()
LongList
listIterator
in interface LongList
public LongListIterator listIterator(int index)
LongList
listIterator
in interface LongList
index
- the index at which to begin the iteration.
public long removeElementAt(int index)
removeElementAt
in interface LongList
index
- the index of the element to remove.
UnsupportedOperationException
- unconditionally.public boolean equals(Object obj)
LongCollection
equals
in interface LongCollection
public int hashCode()
LongCollection
hashCode
in interface LongCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |