code: public static int generationFromRevID(String revID) {
          if (revID == null) return 0;
          int generation = 0;
          int dashPos = revID.indexOf('-');
          if (dashPos > 0) {
              generation = Integer.parseInt(revID.substring(0, dashPos));
          }
          return generation;
      }
docs: //////////////////////////////////////////////////////////