|
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.AbstractShortCollection bak.pcj.list.AbstractShortList
This class represents an abstract base for implementing lists of short 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 |
AbstractShortList()
Default constructor to be invoked by sub-classes. |
Method Summary | |
void |
add(int index,
short v)
Throws UnsupportedOperationException. |
boolean |
add(short v)
Adds an element to this collection. |
boolean |
addAll(int index,
ShortCollection 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,
short c)
Returns the index of the first occurance of a specified element in this list after or at a specified index. |
int |
indexOf(short c)
Returns the index of the first occurance of a specified element in this list. |
ShortIterator |
iterator()
Returns an iterator over this collection. |
int |
lastIndexOf(int index,
short c)
Returns the index of the last occurance of a specified element in this list before a specified index. |
int |
lastIndexOf(short c)
Returns the index of the last occurance of a specified element in this list. |
ShortListIterator |
listIterator()
Returns a list iterator over this list. |
ShortListIterator |
listIterator(int index)
Returns a list iterator over this list, starting from a specified index. |
short |
removeElementAt(int index)
Throws UnsupportedOperationException. |
Methods inherited from class bak.pcj.AbstractShortCollection |
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.ShortList |
get, set |
Methods inherited from interface bak.pcj.ShortCollection |
addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, trimToSize |
Constructor Detail |
protected AbstractShortList()
Method Detail |
public boolean add(short v)
ShortCollection
add
in interface ShortCollection
add
in class AbstractShortCollection
public void add(int index, short v)
add
in interface ShortList
index
- the index at which to add the element. If
index == size() the element is appended
to this list.v
- the short value to add to this list.
UnsupportedOperationException
- unconditionally.ShortCollection.add(short)
,
ShortCollection.addAll(ShortCollection)
,
ShortList.addAll(int,ShortCollection)
public boolean addAll(int index, ShortCollection c)
ShortList
addAll
in interface ShortList
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.
ShortCollection.add(short)
,
ShortList.add(int, short)
,
ShortCollection.addAll(ShortCollection)
public int indexOf(short c)
ShortList
indexOf
in interface ShortList
c
- the element to find.
public int indexOf(int index, short c)
ShortList
indexOf
in interface ShortList
c
- the element to find.index
- the index at which to start the search.
public ShortIterator iterator()
ShortCollection
iterator
in interface ShortCollection
public int lastIndexOf(short c)
ShortList
lastIndexOf
in interface ShortList
c
- the element to find.
public int lastIndexOf(int index, short c)
ShortList
lastIndexOf
in interface ShortList
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 ShortListIterator listIterator()
ShortList
listIterator
in interface ShortList
public ShortListIterator listIterator(int index)
ShortList
listIterator
in interface ShortList
index
- the index at which to begin the iteration.
public short removeElementAt(int index)
removeElementAt
in interface ShortList
index
- the index of the element to remove.
UnsupportedOperationException
- unconditionally.public boolean equals(Object obj)
ShortCollection
equals
in interface ShortCollection
public int hashCode()
ShortCollection
hashCode
in interface ShortCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |