TP2: add class annotations.
[TP_POO.git] / TP2 / Liste.java
index 344a2d3325f134a76399c72892b4dbc996768f18..6928b00737e0656548f61f6b49cc791812f80b77 100644 (file)
@@ -1,5 +1,8 @@
 
-
+@ClassPreamble (
+    author = "Jérôme Benoit",
+    date = "05/12/2011"
+)
 public class Liste extends Structure {
 
     private class IntNode {
@@ -139,9 +142,7 @@ public class Liste extends Structure {
 
     public void compacter(int nElements) {
         // Remove the first nElements
-        if (isEmpty()) {
-            return;
-        } else if (nElements == 0) {
+        if (isEmpty() || nElements == 0) {
             return;
         } else if (headNode != null && headNode.getNext() == null) {
             headNode = null;