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]
/
Structure
/
Entiers.java
diff --git
a/Structure/Entiers.java
b/Structure/Entiers.java
index b4cffb15f6f90406be47212e9f9dede7a02f1e66..80fcc9016434b0b5ec16c3f946c1999e37097fa3 100644
(file)
--- a/
Structure/Entiers.java
+++ b/
Structure/Entiers.java
@@
-60,7
+60,7
@@
class Entiers extends Structure {
private int binarySearch(int first, int last, int value) {
if (last < first)
private int binarySearch(int first, int last, int value) {
if (last < first)
- //FIXME: should not return an integer
+ //FIXME: should not return an integer
return -1;
int middle = (first + last) / 2;
if (value == int_array[middle])
return -1;
int middle = (first + last) / 2;
if (value == int_array[middle])
@@
-98,7
+98,8
@@
class Entiers extends Structure {
}
public void afficher() {
}
public void afficher() {
- System.out.println("---- entiers ----");
+ String className = this.getClass().getSimpleName();
+ System.out.println("---- " + className + " ----");
for (int i = 0; i < getCurrentSize(); i++) {
System.out.println("element " + i + " : " + int_array[i]);
}
for (int i = 0; i < getCurrentSize(); i++) {
System.out.println("element " + i + " : " + int_array[i]);
}