code: @Override
      public TimeZoneRule[] getTimeZoneRules() {
          int size = 1;
          if (historicRules != null) {
              size += historicRules.size();
          }
  
          if (finalRules != null) {
              if (finalRules[1] != null) {
                  size += 2;
              } else {
                  size++;
              }
          }
          TimeZoneRule[] rules = new TimeZoneRule[size];
          rules[0] = initialRule;
          
          int idx = 1;
          if (historicRules != null) {
              for (; idx < historicRules.size() + 1; idx++) {
                  rules[idx] = historicRules.get(idx - 1);
              }
          }
          if (finalRules != null) {
              rules[idx++] = finalRules[0];
              if (finalRules[1] != null) {
                  rules[idx] = finalRules[1];
              }
          }
          return rules;
      }
docs: {@inheritDoc}