grundAufgabe
parent
bee0392231
commit
3b8d673a6f
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>MeineArrayList</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
|
|
@ -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. |
|
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. |
|
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.
|
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 <br> 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 <br> 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.
|
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.
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -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() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue