| 
||||||||||
| 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 operations 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)
 | 
|
 boolean | 
isEmpty()
To know if a vector is empty  | 
|
 java.util.Iterator<T> | 
iterator()
 | 
|
 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)
 | 
|
 T[] | 
toArray()
Allow to access the internal representation of the vector as an array.  | 
|
 void | 
unsafePush(T elem)
To push an element in the vector when you know you have space for it.  | 
|
| 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)
T[] toArray()
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)
boolean isEmpty()
java.util.Iterator<T> iterator()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||