code: @Override
      public ZoneOffsetTransition nextTransition(Instant instant) {
          if (savingsInstantTransitions.length == 0) {
              return null;
          }
          
          long epochSec = instant.getEpochSecond();
  
          // check if using last rules
          if (epochSec >= savingsInstantTransitions[savingsInstantTransitions.length - 1]) {
              if (lastRules.length == 0) {
                  return null;
              }
              // search year the instant is in
              int year = findYear(epochSec, wallOffsets[wallOffsets.length - 1]);
              ZoneOffsetTransition[] transArray = findTransitionArray(year);
              for (ZoneOffsetTransition trans : transArray) {
                  if (epochSec < trans.toEpochSecond()) {
                      return trans;
                  }
              }
              // use first from following year
              if (year < Year.MAX_VALUE) {
                  transArray = findTransitionArray(year + 1);
                  return transArray[0];
              }
              return null;
          }
  
          // using historic rules
          int index  = Arrays.binarySearch(savingsInstantTransitions, epochSec);
          if (index < 0) {
              index = -index - 1;  // switched value is the next transition
          } else {
              index += 1;  // exact match, so need to add one to get the next
          }
          return new ZoneOffsetTransition(savingsInstantTransitions[index], wallOffsets[index], wallOffsets[index + 1]);
      }
docs: -----------------------------------------------------------------------