code: void writeToStream(DataOutput out) throws IOException {
  
          int n = this.strategies.size();
          out.writeInt(n);
  
          if (n == 0) {
              out.writeUTF(this.lastRule.name());
              out.writeInt(this.lastAnnoDomini);
              return;
          }
  
          for (int i = 0; i < n; i++) {
              NewYearStrategy strategy = this.strategies.get(i);
              out.writeUTF(strategy.lastRule.name());
              out.writeInt(strategy.lastAnnoDomini);
          }
  
      }
docs: used in serialization