code: int getTertiaryAfter(int index, int s, int t) {
          long secTer;
          int terLimit;
          if(index == 0) {
              // primary = 0
              if(s == 0) {
                  assert(t != 0);
                  index = (int)elements[IX_FIRST_TERTIARY_INDEX];
                  // Gap at the end of the tertiary CE range.
                  terLimit = 0x4000;
              } else {
                  index = (int)elements[IX_FIRST_SECONDARY_INDEX];
                  // Gap for tertiaries of primary/secondary CEs.
                  terLimit = getTertiaryBoundary();
              }
              secTer = elements[index] & ~SEC_TER_DELTA_FLAG;
          } else {
              assert(index >= (int)elements[IX_FIRST_PRIMARY_INDEX]);
              secTer = getFirstSecTerForPrimary(index + 1);
              // If this is an explicit sec/ter unit, then it will be read once more.
              terLimit = getTertiaryBoundary();
          }
          long st = (((long)s & 0xffffffffL) << 16) | t;
          for(;;) {
              if(secTer > st) {
                  assert((secTer >> 16) == s);
                  return (int)secTer & 0xffff;
              }
              secTer = elements[++index];
              // No tertiary greater than t for this primary+secondary.
              if((secTer & SEC_TER_DELTA_FLAG) == 0 || (secTer >> 16) > s) { return terLimit; }
              secTer &= ~SEC_TER_DELTA_FLAG;
          }
      }
docs: Returns the tertiary weight after [p, s, t] where index=findPrimary(p)
  except use index=0 for p=0.
  
  <p>Must return a weight for every root [p, s, t] as well as for every weight
  returned by getTertiaryBefore(). If s!=0 then t can be BEFORE_WEIGHT16.
  
  <p>Exception: [0, 0, 0] is handled by the CollationBuilder:
  Both its lower and upper boundaries are special.