eu.interedition.collatex.suffixtree.Utils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of collatex-core Show documentation
Show all versions of collatex-core Show documentation
A Java library for collating textual sources, for example, to produce an apparatus.
package eu.interedition.collatex.suffixtree;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
/**
* @author Max Garfinkel
*/
public class Utils {
/**
* Appends a SequenceTerminal element to a supplied array.
*
* @param sequence The sequence to which we are applying the terminating object.
* @param terminatingObject The instance of the terminating object.
* @return A new sequence with an extra element at the end containing the
* terminating object.
*/
static > Object[] addTerminalToSequence(S sequence,
SequenceTerminal terminatingObject) {
ArrayList