repositories
/
TP_POO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the Compactable interface.
[TP_POO.git]
/
TP2
/
Entiers.java
diff --git
a/TP2/Entiers.java
b/TP2/Entiers.java
index 80fcc9016434b0b5ec16c3f946c1999e37097fa3..7d55c4264a81aead1a278a11ed0549e90dbd0b7c 100644
(file)
--- a/
TP2/Entiers.java
+++ b/
TP2/Entiers.java
@@
-75,7
+75,6
@@
class Entiers extends Structure {
System.out.println("Aucune valeur à supprimer");
return false;
}
System.out.println("Aucune valeur à supprimer");
return false;
}
-
for (int i = 0; i < getCurrentSize(); i++) {
if (int_array[i] == value) {
// Deleting the element in the tab
for (int i = 0; i < getCurrentSize(); i++) {
if (int_array[i] == value) {
// Deleting the element in the tab
@@
-105,4
+104,9
@@
class Entiers extends Structure {
}
}
}
}
+ public void compacter(int nElements) {
+ // Remove the last nElements
+ current_size -= nElements;
+ }
+
}
}