コード例 #1
0
 public String currentMatchString() {
   if (array != null) {
     return new String(array, matchingFrom, end - matchingFrom);
   } else {
     return string.substring(matchingFrom, end);
   }
 }
コード例 #2
0
 public String matchedString() {
   if (array != null) {
     return new String(array, start, matchedTo - start);
   } else {
     return string.substring(start, matchedTo);
   }
 }
コード例 #3
0
 public String matchingString() {
   if (array != null) {
     return new String(array, start, end - start);
   } else {
     return string.substring(start, end);
   }
 }
コード例 #4
0
  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);
    }
  }
コード例 #5
0
 public String getSubstring() {
   return string.substring(start(), end());
 }