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.
 | 
					     * 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
 | 
					     * If the Parameter is valid it deletes the specific Pararaph otherwise returns false
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param paragraphNumber
 | 
					     * @param paragraphNumber the Paragraph which should be deleted.
 | 
				
			||||||
     * @return False: If the int is not a valid paragraph.
 | 
					     * @return False: If the int is not a valid paragraph. || True: If the int is a valid paragraph number
 | 
				
			||||||
     * @return True: If the int is a valid paragraph number
 | 
					 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
 | 
					 | 
				
			||||||
    public boolean del(int paragraphNumber) {
 | 
					    public boolean del(int paragraphNumber) {
 | 
				
			||||||
        if (paragraphExists(paragraphNumber)) {
 | 
					        if (paragraphExists(paragraphNumber)) {
 | 
				
			||||||
            text.remove(paragraphNumber - 1);
 | 
					            text.remove(paragraphNumber - 1);
 | 
				
			||||||
| 
						 | 
					@ -135,7 +133,8 @@ public class Text {
 | 
				
			||||||
     * @return ArrayList<String>
 | 
					     * @return ArrayList<String>
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public ArrayList<String> index() {
 | 
					    public ArrayList<String> index() {
 | 
				
			||||||
        HashMap<String,ArrayList<Integer>> wordbook = createWordlist();
 | 
					        HashMap<String,ArrayList<Integer>> wordbook = new HashMap<>();
 | 
				
			||||||
 | 
					        wordbook = createWordlist(wordbook);
 | 
				
			||||||
        String input;
 | 
					        String input;
 | 
				
			||||||
        ArrayList<String> output = new ArrayList<>();
 | 
					        ArrayList<String> output = new ArrayList<>();
 | 
				
			||||||
        ArrayList<Integer> values;
 | 
					        ArrayList<Integer> values;
 | 
				
			||||||
| 
						 | 
					@ -163,8 +162,7 @@ public class Text {
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @return HashMap<String, ArrayList < Integer>>
 | 
					     * @return HashMap<String, ArrayList < Integer>>
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private HashMap<String, ArrayList<Integer>> createWordlist() {
 | 
					    private HashMap<String, ArrayList<Integer>> createWordlist(HashMap<String,ArrayList<Integer>> wordbook) {
 | 
				
			||||||
       HashMap<String,ArrayList<Integer>> wordbook = new HashMap<>();
 | 
					 | 
				
			||||||
        int counter;
 | 
					        int counter;
 | 
				
			||||||
        ArrayList<Integer> numbersList;
 | 
					        ArrayList<Integer> numbersList;
 | 
				
			||||||
        String firstLetter;
 | 
					        String firstLetter;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -77,7 +77,7 @@ public class TextLogik {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                default:
 | 
					                default:
 | 
				
			||||||
                    System.out.println("Command not found. Try again");
 | 
					                    textOutput.errorInvalidCommand();
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -142,7 +142,7 @@ public class TextOutput {
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Method to give out the Error "Invalid String".
 | 
					     * Method to give out the Error "Invalid String".
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public void errorInvalidString() {
 | 
					    public void errorInvalidInput() {
 | 
				
			||||||
        System.err.println("Invalid String");
 | 
					        System.err.println("Invalid String");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue