From 2aa7fb3822d02b22c8dd70e8067493f241c7f907 Mon Sep 17 00:00:00 2001 From: amadoste Date: Wed, 10 Nov 2021 13:14:32 +0100 Subject: [PATCH] Added documentation to class TextLogik. --- src/TextLogik.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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+"); }