Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
77cabcf39a
|
@ -4,6 +4,11 @@ public class TextLogik {
|
|||
private final Text text;
|
||||
private final TextOutput textOutput;
|
||||
|
||||
/**
|
||||
* Initiates a new instance of the class TextLogik.
|
||||
* Contains command instructions for the class Text.
|
||||
* Defined the different cases and appointed to specific commands.
|
||||
*/
|
||||
public TextLogik() {
|
||||
text = new Text();
|
||||
textOutput = new TextOutput();
|
||||
|
@ -79,6 +84,12 @@ public class TextLogik {
|
|||
} while (!"EXIT".equals(command[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to check if a command is numeric.
|
||||
*
|
||||
* @param str command that should be a number.
|
||||
* @return true if the given str matches.
|
||||
*/
|
||||
private boolean isNumeric(String str) {
|
||||
return str.matches("\\d+");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue