public interface IVec<T> extends Serializable
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()  | 
boolean | 
contains(T element)  | 
<E> void | 
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)  | 
int | 
indexOf(T element)  | 
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 
 | 
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(Comparator<T> comparator)  | 
void | 
sortUnique(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. 
 | 
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)
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 vectorvoid 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 vectorvoid moveTo(int dest,
          int source)
vec[dest] = vec[source]dest - the index of the destinationsource - the index of the sourcevoid sort(Comparator<T> comparator)
void sortUnique(Comparator<T> comparator)
boolean isEmpty()
boolean contains(T element)
element - an objectint indexOf(T element)
element - an objectCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.