diff --git a/src/TextLogik.java b/src/TextLogik.java index ab0126e..4038762 100644 --- a/src/TextLogik.java +++ b/src/TextLogik.java @@ -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+"); }