diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..6220d0d --- /dev/null +++ b/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..da18560 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + MeineArrayList + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/README.md b/README.md index 10933bc..a2536fb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ get(int index) | index: index to return | String | returns the String from the s indexOf(String s) | s: String to search | int | Returns the index of the first eaqual String in this list, or -1 if this list does not contain the element. | isEmpty() | | Boolean | Returns true if the list contains no elements. | remove(int index) | index: index to remove | String | removes the specified index and returns the removed String. -set(int index, String s) | index: index to replace
s: String to replace with. | Replaces the String at the specified position in this list with the specified String. | +set(int index, String s) | index: index to replace
s: String to replace with. | Boolean | Replaces the String at the specified position in this list with the specified String. | size() | | int | Returns the number of elements in this list. toArray() | | String[] | Returns an array containing all Strings in this list in proper sequence (from first to last String). The returned Array is a deep copy. This means that if you change a String in the returned Array the String isn't changed in this list. diff --git a/src/de/hs_mannheim/MeineArrayList/MeineArrayList.java b/src/de/hs_mannheim/MeineArrayList/MeineArrayList.java new file mode 100644 index 0000000..7c5a482 --- /dev/null +++ b/src/de/hs_mannheim/MeineArrayList/MeineArrayList.java @@ -0,0 +1,72 @@ +package de.hs_mannheim.MeineArrayList; + +public class MeineArrayList { + //Todo: Implementieren + + public MeineArrayList() { + //Todo: Implementieren + } + + public void add(String n){ + //Todo: Implementieren + } + + public Boolean add(int index, String n){ + //Todo: Implementieren + return false; + } + + public void addAll(MeineArrayList liste){ + //Todo: Implementieren + } + + public Boolean addAll(int index, MeineArrayList liste){ + //Todo: Implementieren + return false; + } + + public void clear(){ + //Todo: Implementieren + } + + public Boolean contains(String s){ + //Todo: Implementieren + return false; + } + + public String get(int index){ + //Todo: Implementieren + return ""; + } + + public int indexOf(String s){ + //Todo: Implementieren + return -1; + } + + public Boolean isEmpty(){ + //Todo: Implementieren + return false; + } + + public String remove(int index){ + //Todo: Implementieren + return ""; + } + + public Boolean set(int index, String s){ + //Todo: Implementieren + return false; + } + + public int size(){ + //Todo: Implementieren + return -1; + } + + public String[] toArray(){ + //Todo: Implementieren + return new String[0]; + } + +} diff --git a/src/de/hs_mannheim/MeineArrayList/MeineArrayList_Test.java b/src/de/hs_mannheim/MeineArrayList/MeineArrayList_Test.java new file mode 100644 index 0000000..8c1af77 --- /dev/null +++ b/src/de/hs_mannheim/MeineArrayList/MeineArrayList_Test.java @@ -0,0 +1,13 @@ +package de.hs_mannheim.MeineArrayList; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class MeineArrayList_Test { + + @Test + void addGetTests() { + } + +}