Reimplemented getNextToken
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / string / tokenizer / TokenizerMatch.java
old mode 100644 (file)
new mode 100755 (executable)
index 439eb2a..f005bc1
@@ -1,21 +1,32 @@
 /*
  * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  * 
  * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
  */
 
 package eu.svjatoslav.commons.string.tokenizer;
 
 public class TokenizerMatch {
 
-       public String token;
-       public Terminator terminator;
+    public final String token;
+    public final String reminder;
+    public final Terminator terminator;
 
-       public TokenizerMatch(final String token, final Terminator terminator) {
-               this.token = token;
-               this.terminator = terminator;
-       }
+    public TokenizerMatch(final String token, final String reminder, final Terminator terminator) {
+        this.token = token;
+        this.reminder = reminder;
+        this.terminator = terminator;
+    }
+
+    @Override
+    public String toString() {
+        return "TokenizerMatch{" +
+                "token='" + token + '\'' +
+                ", reminder='" + reminder + '\'' +
+                ", terminator=" + terminator +
+                '}';
+    }
 }