f0a3fd1b9e66c752a412f9a4b35016e820afaecc
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / string / tokenizer / Terminator.java
1 /*
2  * Svjatoslav Commons - shared library of common functionality.
3  * Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
4  * 
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 3 of the GNU Lesser General Public License
7  * or later as published by the Free Software Foundation.
8  */
9
10 package eu.svjatoslav.commons.string.tokenizer;
11
12 public class Terminator {
13
14     final String startSequence;
15     final boolean ignoreTerminator;
16     String endSequence;
17
18     public Terminator(final String startPattern, final boolean ignoreTerminator) {
19         startSequence = startPattern;
20         this.ignoreTerminator = ignoreTerminator;
21     }
22
23     public Terminator(final String startSequence, final String endSequence,
24                       final boolean ignoreTerminator) {
25
26         this.startSequence = startSequence;
27         this.endSequence = endSequence;
28         this.ignoreTerminator = ignoreTerminator;
29     }
30
31 }