TextLogik default changed
This commit is contained in:
1 parent
be53fc2682
commit
ac061e5085
4 files changed
+8
-10
No files matched your search
@@ -1 +1 @@
|
|||||||
<mxfile host="drawio-plugin" modified="2021-11-11T09:41:48.650Z" agent="5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" etag="0LTIwGkrAKjsi0IIvRN6" version="14.7.4" type="embed"><diagram id="eWy9IwHxbh3JgAdMnOEg" name="Seite-1"><mxGraphModel dx="873" dy="754" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="9L6EbMpzsWciNYXeLQUw-5" value="TextEditor" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="50" y="350" width="220" height="60" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-5" vertex="1"><mxGeometry y="26" width="220" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-8" value="private static void Main(String[] args)" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-5" vertex="1"><mxGeometry y="34" width="220" height="26" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-12" value="Text" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="690" y="210" width="160" height="200" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-13" value="+ ArrayList<String> text" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="26" width="160" height="26" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-14" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="52" width="160" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-15" value="+ add() +dummy(n) + replace(n) + index():Array + getText() + del(n) - createWordlist():HashMap - paragraphExists():boolean" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="60" width="160" height="140" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-16" value="EditorLogik" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="380" y="347" width="160" height="150" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-17" value="Text text SystemOut out " style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="26" width="160" height="74" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-18" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="100" width="160" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-19" value="- isNumeric(String)" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="108" width="160" height="42" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-20" value="SystemOut" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="690" y="433" width="160" height="140" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-21" value="int format " style="Line truncated
|
<mxfile host="drawio-plugin" modified="2021-11-11T10:08:36.751Z" agent="5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" etag="RFuHruWxcTLuDEr7c7r0" version="14.7.4" type="embed"><diagram id="eWy9IwHxbh3JgAdMnOEg" name="Seite-1"><mxGraphModel dx="610" dy="527" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="9L6EbMpzsWciNYXeLQUw-5" value="TextEditor" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="50" y="350" width="220" height="60" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-5" vertex="1"><mxGeometry y="26" width="220" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-8" value="private static void Main(String[] args)" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-5" vertex="1"><mxGeometry y="34" width="220" height="26" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-12" value="Text" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="690" y="210" width="220" height="180" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-13" value="+ ArrayList<String> text" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="26" width="220" height="26" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-14" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="52" width="220" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-15" value="+ add() +dummy(n) + replace(n) + index():ArrayList + getText() + del(n) - createWordlist(HashMap):HashMap - paragraphExists():boolean" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;shadow=0;" parent="9L6EbMpzsWciNYXeLQUw-12" vertex="1"><mxGeometry y="60" width="220" height="120" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-16" value="EditorLogik" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="380" y="347" width="160" height="150" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-17" value="Text text SystemOut out " style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="26" width="160" height="74" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-18" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="100" width="160" height="8" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-19" value="- isNumeric(String)" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;" parent="9L6EbMpzsWciNYXeLQUw-16" vertex="1"><mxGeometry y="108" width="160" height="42" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-20" value="SystemOut" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1"><mxGeometry x="690" y="433" width="160" height="140" as="geometry"/></mxCell><mxCell id="9L6EbMpzsWciNYXeLQUw-21" value="int Line truncated
|
||||||
+5
-7
@@ -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;
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ public class TextLogik {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println("Command not found. Try again");
|
textOutput.errorInvalidCommand();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -127,7 +127,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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user