2 * Svjatoslav Commons - shared library of common functionality.
3 * Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
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.
10 package eu.svjatoslav.commons.string.tokenizer;
12 public class Terminator {
14 final String startSequence;
16 TerminationStrategy termination;
18 public Terminator(final String startPattern, TerminationStrategy termination) {
19 startSequence = startPattern;
20 this.termination = termination;
23 public Terminator(final String startSequence, final String endSequence, TerminationStrategy termination) {
24 this.startSequence = startSequence;
25 this.endSequence = endSequence;
26 this.termination = termination;
29 enum TerminationStrategy {