Skip to content
Snippets Groups Projects
Commit 21dee834 authored by Thomas Lapp's avatar Thomas Lapp
Browse files

ajout linkedListPerso

parents 25c31c4a b0eb80a1
Branches
No related merge requests found
......@@ -4,11 +4,15 @@ import java.util.ArrayList;
public class ArrayListStd<E> extends ArrayList<E> implements Structure{
private ArrayListStd<E> liste;
private ArrayList<E> liste;
public ArrayListStd()
{
<<<<<<< HEAD
liste = new ArrayListStd<E>();
=======
liste = new ArrayList<E>();
>>>>>>> b0eb80a19a87220e9305a3913f8b3e966756c014
}
@Override
......
......@@ -4,11 +4,15 @@ import java.util.LinkedList;
public class LinkedListStd<E> extends LinkedList<E> implements Structure {
private LinkedListStd<E> liste;
private LinkedList<E> liste;
public LinkedListStd()
{
<<<<<<< HEAD
liste = new LinkedListStd<E>();
=======
liste = new LinkedList<E>();
>>>>>>> b0eb80a19a87220e9305a3913f8b3e966756c014
}
@Override
......
package p4a;
public class Main {
public static void main(String[] args) {
ArrayListStd<Integer> arrayListStd = new ArrayListStd<Integer>();
for (int i = 0; i < 1000; i++) {
arrayListStd.ajout(i, 0);
}
}
}
......@@ -7,7 +7,7 @@ public class TableauPerso implements Structure{
public TableauPerso(int taille) {
if (taille < 0) {
throw new IllegalArgumentException("TableauPerso : taille négative " + taille);
throw new IllegalArgumentException("TableauPerso : taille negative " + taille);
}
this.tableau = new Object[taille];
......
......@@ -10,12 +10,12 @@ public class TableauStd implements Structure {
@Override
public void ajout(Object element, int position) {
throw new UnsupportedOperationException("ajout : opration non supporte");
throw new UnsupportedOperationException("ajout : operation non supportee");
}
@Override
public void suppression(int position) {
throw new UnsupportedOperationException("ajout : opration non supporte");
throw new UnsupportedOperationException("suppression : operation non supportee");
}
@Override
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment