added Javadocs to new methods
This commit is contained in:
parent
117420c815
commit
230ff7f470
|
@ -60,7 +60,7 @@ public class TextLogik {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "INDEX":
|
case "INDEX":
|
||||||
textOutput.IndexOutput(text.index());
|
textOutput.indexOutput(text.index());
|
||||||
break;
|
break;
|
||||||
case "PRINT":
|
case "PRINT":
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class TextLogik {
|
||||||
|
|
||||||
private void checkIfSuccess(boolean method) {
|
private void checkIfSuccess(boolean method) {
|
||||||
if(method) {
|
if(method) {
|
||||||
textOutput.UserInfoOutput("Command was successfully");
|
textOutput.userInfoOutput("Command was successfully");
|
||||||
}else {
|
}else {
|
||||||
textOutput.errorInvalidParagraph();
|
textOutput.errorInvalidParagraph();
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,8 @@ public class TextOutput {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method which sets the Variable formatRaw to true.
|
* Method which sets the Variable formatRaw to true.
|
||||||
|
*
|
||||||
|
* @return true to indicate that it was successful.
|
||||||
*/
|
*/
|
||||||
public boolean formatRaw() {
|
public boolean formatRaw() {
|
||||||
formatRaw = true;
|
formatRaw = true;
|
||||||
|
@ -118,7 +120,8 @@ public class TextOutput {
|
||||||
* Method to set the formatRaw to false and also set the length of the desired paragraph length in order to limit
|
* Method to set the formatRaw to false and also set the length of the desired paragraph length in order to limit
|
||||||
* the paragraph length when printing the text.
|
* the paragraph length when printing the text.
|
||||||
*
|
*
|
||||||
* @param length the maximum length of each paragraph that is allowed to be displayed when printing the text.
|
* @param length the paragraph length when printing the text.
|
||||||
|
* @return returns true if successful and false if and invalid length has been submitted.
|
||||||
*/
|
*/
|
||||||
public boolean formatFix(int length) {
|
public boolean formatFix(int length) {
|
||||||
if(length > 0) {
|
if(length > 0) {
|
||||||
|
@ -132,15 +135,20 @@ public class TextOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methode um die Benutzerinformationen auszugeben.
|
* Method which outputs user information.
|
||||||
*
|
*
|
||||||
* @param info Benutzerinformationen
|
* @param info User information received as a String.
|
||||||
*/
|
*/
|
||||||
public void UserInfoOutput(String info) {
|
public void userInfoOutput(String info) {
|
||||||
System.out.println(info);
|
System.out.println(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void IndexOutput(ArrayList<String> index) {
|
/**
|
||||||
|
* Outputs the index that contains words with corresponding paragraphs.
|
||||||
|
*
|
||||||
|
* @param index ArrayList with words and in which part they have
|
||||||
|
*/
|
||||||
|
public void indexOutput(ArrayList<String> index) {
|
||||||
for (String word : index) {
|
for (String word : index) {
|
||||||
System.out.println(word);
|
System.out.println(word);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue