|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IVec<T>
An abstraction on the type of vector used in the library.
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
|
copyTo(E[] dest)
|
|
void |
copyTo(IVec<T> copy)
Ces op�rations devraient se faire en temps constant. |
|
T |
delete(int i)
Delete the ith element of the vector. |
|
void |
ensure(int nsize)
|
|
T |
get(int i)
|
|
void |
growTo(int newsize,
T pad)
|
|
void |
insertFirst(T elem)
Insert an element at the very begining of the vector. |
|
void |
insertFirstWithShifting(T elem)
|
|
T |
last()
return the latest element on the stack. |
|
void |
moveTo(int dest,
int source)
Move elements inside the vector. |
|
void |
moveTo(IVec<T> dest)
Move the content of the vector into dest. |
|
void |
pop()
Pop the last element on the stack. |
|
IVec<T> |
push(T elem)
|
|
void |
remove(T elem)
Enleve un element qui se trouve dans le vecteur!!! |
|
void |
set(int i,
T o)
|
|
void |
shrink(int nofelems)
Remove nofelems from the Vector. |
|
void |
shrinkTo(int newsize)
reduce the Vector to exactly newsize elements |
|
int |
size()
|
|
void |
sort(java.util.Comparator<T> comparator)
|
|
void |
sortUnique(java.util.Comparator<T> comparator)
|
|
void |
unsafePush(T elem)
To push an element in the vector when you know you have space for it. |
|
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
int size()
void shrink(int nofelems)
nofelems - the number of elements to remove.void shrinkTo(int newsize)
newsize - the new size of the vector.void pop()
void growTo(int newsize,
T pad)
void ensure(int nsize)
IVec<T> push(T elem)
void unsafePush(T elem)
elem - void insertFirst(T elem)
elem - the element to put first in the vector.void insertFirstWithShifting(T elem)
void clear()
T last()
T get(int i)
void set(int i,
T o)
void remove(T elem)
elem - un element du vecteurT delete(int i)
i - the indexer of the element in the vector
void copyTo(IVec<T> copy)
copy - <E> void copyTo(E[] dest)
void moveTo(IVec<T> dest)
dest - the vector where top put the content of this vector
void moveTo(int dest,
int source)
vec[dest] = vec[source]
dest - the index of the destinationsource - the index of the sourcevoid sort(java.util.Comparator<T> comparator)
void sortUnique(java.util.Comparator<T> comparator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||