diff options
Diffstat (limited to 'src/Client/ParsedLine.java')
-rw-r--r-- | src/Client/ParsedLine.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Client/ParsedLine.java b/src/Client/ParsedLine.java index 807f289..ebc45b1 100644 --- a/src/Client/ParsedLine.java +++ b/src/Client/ParsedLine.java @@ -6,6 +6,16 @@ public class ParsedLine { private String line; private Hashtable <String, String> dict; + + /** constructor, returning dictionary. + * @param text line + * for example input: ":sweetmorn.cohens.org.il 352 tzafrir #chat-dor ~tzafrir localhost" + * output: a dictionary with the following entries: + * - server: sweetmorn.cohens.org.il + * - command: 352 + * - nick: tzafrir + * - message: #chat-dor ~tzafrir localhost + */ public ParsedLine(String line) { this.line = line; @@ -68,6 +78,8 @@ public class ParsedLine System.err.println("Notice: failed to parse message message: [" + line + "]"); } + /** getting the results from the dictionary + @param property */ public String get(String property) { return dict.get(property); |