code: public final synchronized int compareTo (final Integer anotherSerialNumber) {
  
          long diff = serialNumber - Utils.getUnsignedLong(anotherSerialNumber.intValue());
          if (diff >= MAXIMUM_VALUE) {
              diff -= (MAXIMUM_VALUE + 1);
          } else if (diff < -MAXIMUM_VALUE) {
              diff += (MAXIMUM_VALUE + 1);
          }
          return (int) diff;
      }
docs: {@inheritDoc}