Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
88f98bff0b
File diff suppressed because one or more lines are too long
|
@ -104,11 +104,9 @@ public class Text {
|
|||
* This method deletes a specific Paragraph. As a Parameter it uses a int.
|
||||
* If the Parameter is valid it deletes the specific Pararaph otherwise returns false
|
||||
*
|
||||
* @param paragraphNumber
|
||||
* @return False: If the int is not a valid paragraph.
|
||||
* @return True: If the int is a valid paragraph number
|
||||
* @param paragraphNumber the Paragraph which should be deleted.
|
||||
* @return False: If the int is not a valid paragraph. || True: If the int is a valid paragraph number
|
||||
*/
|
||||
|
||||
public boolean del(int paragraphNumber) {
|
||||
if (paragraphExists(paragraphNumber)) {
|
||||
text.remove(paragraphNumber - 1);
|
||||
|
@ -135,7 +133,8 @@ public class Text {
|
|||
* @return ArrayList<String>
|
||||
*/
|
||||
public ArrayList<String> index() {
|
||||
HashMap<String,ArrayList<Integer>> wordbook = createWordlist();
|
||||
HashMap<String,ArrayList<Integer>> wordbook = new HashMap<>();
|
||||
wordbook = createWordlist(wordbook);
|
||||
String input;
|
||||
ArrayList<String> output = new ArrayList<>();
|
||||
ArrayList<Integer> values;
|
||||
|
@ -163,8 +162,7 @@ public class Text {
|
|||
*
|
||||
* @return HashMap<String, ArrayList < Integer>>
|
||||
*/
|
||||
private HashMap<String, ArrayList<Integer>> createWordlist() {
|
||||
HashMap<String,ArrayList<Integer>> wordbook = new HashMap<>();
|
||||
private HashMap<String, ArrayList<Integer>> createWordlist(HashMap<String,ArrayList<Integer>> wordbook) {
|
||||
int counter;
|
||||
ArrayList<Integer> numbersList;
|
||||
String firstLetter;
|
||||
|
|
|
@ -77,7 +77,7 @@ public class TextLogik {
|
|||
|
||||
break;
|
||||
default:
|
||||
System.out.println("Command not found. Try again");
|
||||
textOutput.errorInvalidCommand();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ public class TextOutput {
|
|||
/**
|
||||
* Method to give out the Error "Invalid String".
|
||||
*/
|
||||
public void errorInvalidString() {
|
||||
public void errorInvalidInput() {
|
||||
System.err.println("Invalid String");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue