|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEnsembleEntierTab
EnsembleEntierTab represente un ensemble d'entiers sous la forme
d'un tableau.
| Class Specifications |
|
public invariant this.estVide() <==> this.getCardinal() == 0; public invariant !this.estVide() ==> this.contient(this.getMin()); public invariant !this.estVide() ==> this.getMin() == ( \min int x; this.contient(x); x); public invariant this.getCapacite() > 0; public invariant 0 <= this.getCardinal()&&this.getCardinal() <= this.getCapacite(); |
| Specifications inherited from class Object |
| public represents _getClass <- \typeof(this); |
| Model Field Summary |
| Model fields inherited from class java.lang.Object |
_getClass, objectState, theString |
| Ghost Field Summary |
| Ghost fields inherited from class java.lang.Object |
objectTimesFinalized, owner |
| Constructor Summary | |
EnsembleEntierTab(int taille_)
Construction d'un ensemble de capacite taille_. |
|
| Model Method Summary |
| Model methods inherited from class java.lang.Object |
hashValue |
| Method Summary | |
void |
ajouter(int x)
Ajouter l'element x dans l'ensemble. |
boolean |
contient(int x)
Est-ce que x appartient a l'ensemble ? |
boolean |
estVide()
Est-ce que l'ensemble est vide ? |
int |
getCapacite()
getCapacite renvoie la capacite de l'ensemble. |
int |
getCardinal()
getCardinal renvoie le cardinal de l'ensemble. |
int |
getMin()
Le plus petit element de l'ensemble. |
void |
oter(int x)
Enlever l'element x de l'ensemble. |
java.lang.String |
toString()
Une representation de l'ensemble sous forme de chaine de caracteres, comme par exemple "{ 1, 5, 2 }". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public EnsembleEntierTab(int taille_)
taille_ - contenance de l'ensemble| Method Detail |
public int getCapacite()
getCapacite renvoie la capacite de l'ensemble.
public int getCardinal()
getCardinal renvoie le cardinal de l'ensemble.
public boolean estVide()
true si l'ensemble est videpublic boolean contient(int x)
x appartient a l'ensemble ?
x - un int qui est l'element cherche
true si x
appartient a l'ensemblepublic void ajouter(int x)
x - l'element a ajouterpublic void oter(int x)
x - l'element a supprimerpublic int getMin()
public java.lang.String toString()
toString in class java.lang.ObjectString
de l'ensemble
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||