public String currentMatchString() { if (array != null) { return new String(array, matchingFrom, end - matchingFrom); } else { return string.substring(matchingFrom, end); } }
public String matchedString() { if (array != null) { return new String(array, start, matchedTo - start); } else { return string.substring(start, matchedTo); } }
public String matchingString() { if (array != null) { return new String(array, start, end - start); } else { return string.substring(start, end); } }
private void naiveExtendSuffixTree(int arrayIdx) { TreeString string = strings.get(arrayIdx); // the array.length-1 constraint, instead of array.length, is because // we assume that the terminal character has already been added to the // string, and we don't want to *just* add the suffix that is that // character. for (int i = 0; i <= string.length(); i++) { logger.log( Level.FINEST, String.format("Naive Extension: \"%s\"", string.substring(i, string.length() + 1))); naiveExtendSuffix(string, i); } }
public String getSubstring() { return string.substring(start(), end()); }