public void printSuffixes(PrintStream ps) {
   ps.print(" [");
   int i = 0;
   for (StringSuffix ss : suffixes) {
     ps.print((i == 0 ? "" : ",") + ss.toString());
     i++;
   }
   ps.print("]");
 }
 public int compareTo(StringSuffix ss) {
   int stringID = getStringIndex();
   if (stringID < ss.getStringIndex()) {
     return -1;
   }
   if (stringID > ss.getStringIndex()) {
     return 1;
   }
   if (offset < ss.offset) {
     return -1;
   }
   if (offset > ss.offset) {
     return 1;
   }
   return 0;
 }
 public void nextSuffix() {
   currentSuffix = new StringSuffix(string, currentSuffix.getOffset() + 1);
 }