T - the type of the container.public final class ReadOnlyVec<T> extends Object implements IVec<T>
| Constructor and Description | 
|---|
ReadOnlyVec(IVec<T> vec)  | 
| 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)  | 
boolean | 
equals(Object obj)  | 
T | 
get(int i)  | 
void | 
growTo(int newsize,
      T pad)  | 
int | 
hashCode()  | 
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. 
 | 
String | 
toString()  | 
void | 
unsafePush(T elem)
To push an element in the vector when you know you have space for it. 
 | 
public void copyTo(IVec<T> copy)
IVecpublic T delete(int i)
IVecpublic void insertFirst(T elem)
IVecinsertFirst in interface IVec<T>elem - the element to put first in the vector.public void insertFirstWithShifting(T elem)
insertFirstWithShifting in interface IVec<T>public boolean isEmpty()
IVecpublic T last()
IVecpublic void moveTo(IVec<T> dest)
IVecpublic void moveTo(int dest,
          int source)
IVecvec[dest] = vec[source]public void pop()
IVecpublic void remove(T elem)
IVecpublic void shrink(int nofelems)
IVecpublic void shrinkTo(int newsize)
IVecpublic int size()
public void sort(Comparator<T> comparator)
public void sortUnique(Comparator<T> comparator)
sortUnique in interface IVec<T>public T[] toArray()
IVecpublic void unsafePush(T elem)
IVecunsafePush in interface IVec<T>public boolean contains(T element)
public int indexOf(T element)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.