summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/parserutils/delims/StringDelimiter.java
blob: 6db1c9803dd108c93c51870911b0f9fbd2a1561c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package bjc.utils.parserutils.delims;

import bjc.utils.data.ITree;

/**
 * A sequence delimiter specialized for strings.
 * 
 * @author EVE
 *
 */
public class StringDelimiter extends SequenceDelimiter<String> {

	/**
	 * Override of
	 * {@link SequenceDelimiter#delimitSequence(SequenceCharacteristics, Object...)}
	 * for ease of use for strings.
	 * 
	 * @param seq
	 *                The sequence to delimit.
	 * 
	 * @return The sequence as a tree.
	 * 
	 * @throws DelimiterException
	 *                 if something went wrong with delimiting the sequence.
	 * 
	 * @see SequenceDelimiter
	 */
	public ITree<String> delimitSequence(String... seq) throws DelimiterException {
		return super.delimitSequence(new SequenceCharacteristics<>("root", "contents", "subgroup"), seq);
	}
}